필터 지우기
필터 지우기

Matlab Simulink variable's time

조회 수: 3 (최근 30일)
Darka
Darka 2014년 4월 1일
답변: Darka 2014년 5월 18일
Hello,
I want to know more about Matlab Simulink variable's time. I need an option to measure how long the variable maintains its value in Matlab Simulink during simulation mode and how many times variable's value has changed.
Any ideas how to do that?
  댓글 수: 1
Giuseppe Naselli
Giuseppe Naselli 2014년 4월 4일
did you see my answer? if you use it and it works please accept it :) G

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

답변 (2개)

Giuseppe Naselli
Giuseppe Naselli 2014년 4월 1일
Hi Darka,
you can log your variable using a "outport" for example (or a "to Workspace" block), you can also set your model to give the variable time in the Matlab workspace at the end of the simulation(from Model Configuration Parameter) and then once the simulation finishes you can plot/post process your variable in Matlab and see how it chances
Alternatively you can use the DETECT CHANGE block (in the Logic and Bit Operation Simulink Block Library) and then log the output of this block
I hope this help
G

Darka
Darka 2014년 5월 18일
Hello,
Sorry I am newbie in Matlab Simulink.
I want to have a timer (stopwatch) which will be always enabled since the value is 0. If the value changes to something else, for example 6, then a timer will be reset and it will begin to count again when this value changes to 0. I want to check if this value is 0 or not for 60 seconds.
How can I do that?
Best regards,
Darka

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by