PMSM DRIVE EXAMPLE: where are the model's variables located?
17 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Stefano
el 21 de Oct. de 2025 a las 12:01
Comentada: Chuguang Pan
el 23 de Oct. de 2025 a las 7:11
Hello,
I'm playing with R2025b demo license and I'm trying to understand PMSM Drive Example in simscape electrical.
The .m file reports just a command line:
set_param(find_system('PMSMDrive','FindAll', 'on','type','annotation','Tag','ModelFeatures'),'Interpreter','off')
One time I run the model it works and in the workspace a list of variables appear.
But where those variables are located? I don't see any configuration files or similar. I'm trying to see if a configuration Musk is present for each block, but nothing.
Thanks in advanced for the support
Stefano
0 comentarios
Respuestas (1)
Chuguang Pan
el 21 de Oct. de 2025 a las 12:29
2 comentarios
Chuguang Pan
el 23 de Oct. de 2025 a las 7:11
@Stefano. If you want to load associated parameters of model before opening the model, you can write a .m file which includes parameter initialization setting statements. Then , you can call this .m file from the PreloadFcn property of model. In addition, you can organize your code files as a MATLAB Project for better management, and set the matlab.project.Project.StartupFiles of your project as the parameters initialization file. The StartupFiles will run first before loading model.
Ver también
Categorías
Más información sobre Magnetic Elements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!