Hi all, I made a Simulink model that incorporates a certain given block, as well as a matlab function I wrote myself. The given block demands that the time step will be 0.001 secs, but the function (using tic/toc) takes close to 0.003 secs to calculate.
Does anyone know the mechanism behind this? should I use a rate transition block before and after the function? Or is it OK to leave it as-is?
Thanks in advace, Tim

 채택된 답변

Titus Edelhofer
Titus Edelhofer 2015년 2월 10일

0 개 추천

Hi Tim,
Simulink does not simulate in Real-Time. So if a step of 1s of simulation time takes 0.01s of computer time or an hour does not make a difference (accept with regards to the patience you need).
Titus

댓글 수: 1

Tim
Tim 2015년 2월 16일
Thank you,
The model runs on external mode with real-time HIL blocks. I just let put them all together and it worked nicely (certain errors with specific arrangements but I managed to avoid them).

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Subsystems에 대해 자세히 알아보기

질문:

Tim
2015년 2월 10일

댓글:

Tim
2015년 2월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by