MATLAB built-in examples not opening and giving error
18 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Pooya Taheri
el 3 de Nov. de 2023
Comentada: Pooya Taheri
el 3 de Nov. de 2023
I use version 2023a. Toolboxes are properly installed (Simsacpe and Simscape electrical). [SL: fixed typo in release number based on information from sidebar.]
When I try opening the example, I get the following error:
>> openExample('simscapeelectrical/InductionMachineScalarExample')
found =
logical
0
Error using matlab.internal.examples.findExamplesXml
Unable to find "simscapeelectrical/InductionMachineScalarExample". Check whether
"simscapeelectrical" is the location for "simscapeelectrical/InductionMachineScalarExample" and
try again.
Error in findExample (line 14)
examplesXml = matlab.internal.examples.findExamplesXml(component,arg);
Error in setupExample (line 6)
metadata = findExample(arg);
Error in openExample (line 30)
[workDir,metadata] = setupExample(exampleId, workDir);
This error is not specific to this example. I get the same error for any example that I need to open using the openExample(***) format.
I installed the documentation locally and also tried online version, and restarted MATLAB, but I still had the same error.
I appreciate any help. I did not have this issue in the past when I used earlier versions.
6 comentarios
Respuesta aceptada
Steven Lord
el 3 de Nov. de 2023
According to the Release Notes for Simscape Electrical, the names of the example models and/or the way you access them changed in release R2023b. If you're referring to the online documentation (which is for the current release, release R2023b as I type this) you're seeing the newer names. Expanding the "Example name mapping" section in that Release Notes entry the name in release R2023a and before was ee_asm_scalar_control.
When I launch release R2023a and type that name a model opens. Or you could open the release R2023a documentation (in your installation or on the website), navigate to the example you want to open, copy the command to open it using the button in the upper-right corner of the example page, and run that in the MATLAB Command Window.
Más respuestas (0)
Ver también
Categorías
Más información sobre Variable Initialization 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!