필터 지우기
필터 지우기

Error in loading an Open Example

조회 수: 48 (최근 30일)
Vaibhav
Vaibhav 2023년 3월 29일
댓글: Vaibhav 2023년 3월 29일
I have been trying to load the following code which then opens up a Simulink Model:
openExample('autoblks/HEVP0ReferenceApplicationExample')
However, when I hit enter, I am encountering the following issue:
Error using matlab.internal.examples.componentExamplesDir
Invalid argument "autoblks".
Error in findExample (line 11)
componentExamplesDir = matlab.internal.examples.componentExamplesDir(component);
Error in openExample (line 30)
metadata = findExample(exampleId);
I am not sure what this is about and no one else seems to have a problem like this. All help is appreciated.

답변 (1개)

Cris LaPierre
Cris LaPierre 2023년 3월 29일
Run the command "ver" in your Command Window and verify that you have Powertrain Blockset and Simscape installed. If they are not and are included in your license, you can use the Add-Ons Explorer to install them.
Note that, in R2022a, the command to launch the model is slightly different (see R2022a doc)
cd(setupExample('autoblks/HEVP0ReferenceApplicationExample'));helpersetuphevp0
  댓글 수: 1
Vaibhav
Vaibhav 2023년 3월 29일
Hi, I just tried this and realised that I had not installed the Powertrain Blockset at the time of installation. Thank you so much for your help and I really appreciate it!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Powertrain Blockset에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by