필터 지우기
필터 지우기

add_block(​'powertrai​nlib/Power​train','Ge​nerator_to​_Electric_​Motor/Powe​rtrain’);

조회 수: 5 (최근 30일)
xiaoming li
xiaoming li 2023년 12월 25일
답변: Fangjun Jiang 2024년 1월 5일
add_block('powertrainlib/Powertrain','Generator_to_Electric_Motor/Powertrain);
Error due to multiple causes.
Caused by:
Unable to load block diagram 'powertrainlib'
There is no block named 'powertrainlib/Powertrain'
how to fix this?

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2024년 1월 5일
The full path of the source block is incorrect. The best way to handle this, is to do it manually.
If you are able to open the powertrain library manully, then select the block you want to add, go to MATLAB Command Window, type 'gcb'. It will show you the correct path of the block. Then you can use it in the add_block(). For example:
>> gcb
ans =
'autolibmotorctrlr/Interior PM Controller'

카테고리

Help CenterFile Exchange에서 Automotive Applications에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by