필터 지우기
필터 지우기

How I can generate a continuous signal using a solver with fixed step size?

조회 수: 1 (최근 30일)
Fabrizio
Fabrizio 2013년 4월 27일
Hello people! In my simulation I must use a fixed step size (0.01 s) with the solver ode4 (Runge-Kutta). The input to my model is a constant block. I want that this block run each 0.2 second (I know how to do this) and I want a signal longer than the fixed step size..I mean I want a signal of the duration of 0.3 s, a continuous signal 0.3 s long. Is it possible? Thank you veru much, Fabrizio
  댓글 수: 2
Ryan G
Ryan G 2013년 5월 1일
Why don't you increase the fixed step size? What you're looking for may depend very much on your model and setup. Do you know what continuous vs discrete means here? If your not processing signals faster than 0.01 seconds than you may not need to run any faster. Again, this really depends on your model.
Another option is a for-iterator subsystem.
Fabrizio
Fabrizio 2013년 6월 1일
Thank you Ryan for your answer and excuse me for the delay of this comment! Anyway I solved the problem in this way: I used an atomic subsystem linked with a rate transition block! in this way I can keep the step of the simulation at 0.01 s (it's a must) and inside the asub everithiing run at 0.2s! then the rate transition put the out of asub inside the main(because in that environment I have to manage the output)!

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

답변 (1개)

Babak
Babak 2013년 5월 1일
You need to let your tmax be 0.4 and solve then discard the data for 0.3<t<0.4
  댓글 수: 1
Fabrizio
Fabrizio 2013년 6월 1일
Thank you Babak for your answer and excuse me for the delay of this comment! Anyway I solved the problem in this way: I used an atomic subsystem linked with a rate transition block! in this way I can keep the step of the simulation at 0.01 s (it's a must) and inside the asub everithiing run at 0.2s! then the rate transition put the out of asub inside the main(because in that environment I have to manage the output)!

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

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by