How can I know what variable time step the Simulink has taken and use it in workspace?
조회 수: 2 (최근 30일)
이전 댓글 표시
I am using a variable step solver in Simulink. I know the time at which it is solving, but I would like to know what will be the next time step it will solve at.
This depends upon the time step Simulink takes. Since it is a variable time step, I dont have the value. How can I bring the time-step simulink is attempting into my workspace and use it in an mfile that solves within this time interval?
( Say simulink is solving from [input_simulink:?] )
my lower level m file looks like this :
tstart = input_simulink %time from clock delta_t = ? ; % NEED SIMULINK VARIABLE TIME STEP HERE tend = tstart + delta_t; tspan= [tstart tend]; . . [tout, yout] = ode15s(...)
Please help.
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2013년 4월 18일
I'am not sure to understand your question, maybe you should use the clock bloc from simulink/sources to get the time at each step.
댓글 수: 3
vikash
2013년 10월 4일
i'm facing a similar problem. i want to multiply a simulink generated function with time clock. for example, let a source generating sin(w*t), i want to find out t*sin(w*t), where both the 't' are controlled by clock. how to do it?
mona aljeagdaf
2018년 10월 10일
I have a problem choosing the type of solver in Simulink. Whenever I want to run the model does not work and ask me to change the type and variables of solver or ode and I have other frequently without reaching the solution please help
참고 항목
카테고리
Help Center 및 File Exchange에서 General Applications에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!