If i want to read the different values from a signal at different instance of time generated by the scope from simulink. How to do it?
조회 수: 9 (최근 30일)
이전 댓글 표시
I have a PULSE WIDTH MODULATED SIGNAL. I want to read the values each time the signal changes from one step to another. Please help
댓글 수: 0
답변 (1개)
TAB
2012년 12월 6일
편집: TAB
2012년 12월 6일
Save your scope data on base workspace by enabling option Scope Parameters > History > Save data to workspace with Foramat = Structure with time. From save structure you can read the signal value at any point of time.
For example if you want value at time t=5. Then on base workspace type
MyVal = ScopeData.signals.values[5]
댓글 수: 1
Shivakumar
2014년 3월 7일
Hi, I have same kind of question and I tried the above command. I used simout instead of ScopeData but with the same format. But I dont understand why is it showing this error.
Error: Unbalanced or unexpected parenthesis or bracket.
Please help
참고 항목
카테고리
Help Center 및 File Exchange에서 View Data During Simulation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!