필터 지우기
필터 지우기

Insert a detector block in simulink

조회 수: 1 (최근 30일)
Andrea
Andrea 2013년 1월 28일
Hi,
I have a simulink model; in this model I should insert, in automatic way, a detector block.
I have written this code line:
hDetector=add_block('Simulink Design Verifier/Temporal Operators/Detector',[blockName 'Detector'])
but matlab gives me this error: "There is no block named 'Simulink Design Verifier/Temporal Operators/Detector".
Where am I wrong? I think I am wrong to call the library in add_block function, is correct?
Thanks in advance
Andrew

채택된 답변

Kaustubha Govind
Kaustubha Govind 2013년 1월 28일
Try this instead:
hDetector=add_block('sldvlib/Temporal Operators/Detector',[blockName 'Detector'])
You can right click on the 'Simulink Design Verifier' library in the Simulink Library Browser and select "Open Simulink Design Verifier Library" to find the actual name of the library.

추가 답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 1월 28일
편집: Azzi Abdelmalek 2013년 1월 28일
Create a file librairy called for example lib1, then copy all the blocks you need from ' Temporal Operators ', then add this code
load_system('lib1')
add_block('lib1/Detector',[yourmodelname '/Detector1'])

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by