필터 지우기
필터 지우기

xPC, getsignalid returns 0, NOT empty

조회 수: 1 (최근 30일)
Kosuke
Kosuke 2012년 1월 23일
I tried to get signal id by using getsignalid(tg,'signal_name').
For one of the signal in my model, it returns 0 (not empty). I think if the 'signal_name' is wrong, it returns empty. Then, what 0 means? If there is any document about this, I would be happy to know.
Thanks!
  댓글 수: 1
Walter Roberson
Walter Roberson 2012년 1월 28일
I am not presently able to find any information proving that a signal ID _cannot_ be 0. But there is a lot of documentation to go through and it might have been somewhere I did not look yet.

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

채택된 답변

Shiva Arun Kumar
Shiva Arun Kumar 2012년 2월 6일
Hi Kosuke,
0 is a valid signal ID and you are correct, [] is returned when the signal name is incorrect.
For example, when you build and download one of our example models "xpcosc", you can execute the following commands to obtain a complete list of signals along with their associated ids:
*tg=xpc
tg.showsignals='on'*
Signals = INDEX VALUE BLOCK NAME LABEL
0 0.000000 Gain
1 0.000000 Gain1
2 0.000000 Gain2
3 0.000000 Integrator
4 0.000000 Integrator1
5 0.000000 Signal Generator
6 0.000000 Sum
Hope that helps,
Shiva

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by