MATLAB built-in examples not opening and giving error

20 visualizzazioni (ultimi 30 giorni)
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 Commenti
Pooya Taheri
Pooya Taheri il 3 Nov 2023
Thank you both for your comments, and sorry about the typo.

Accedi per commentare.

Risposta accettata

Steven Lord
Steven Lord il 3 Nov 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.

Più risposte (0)

Categorie

Scopri di più su Variable Initialization in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by