필터 지우기
필터 지우기

How to increment real world time in matlab function block of simulink?

조회 수: 2 (최근 30일)
abc NP
abc NP 2015년 4월 2일
댓글: abc NP 2015년 4월 7일
Hi, I want to advance the complete system for n clk cycles or n samples(discrete constant sample period). Can I do this in matlab function block in simulink (simulink -> usr-defined-functions -> matlab function). Is this possible in matlab and simulink ?

답변 (1개)

Denis Gurchenkov
Denis Gurchenkov 2015년 4월 7일
I don't think there is a way to "fast forward" the simulation time. However, you can achieve nearly same result by placing your blocks into a conditionally executed subsystem, and configure it so that the subsystem is not executed for the next N samples. Would this work for you?
  댓글 수: 1
abc NP
abc NP 2015년 4월 7일
Hi Denis, Now my quest changed in another way. I have a huge model, where I want to change inputs (and observe outputs) to that model dynamically every time-sample/time-step. Now, even changing that for so many times is also time-consuming and I want to reuse these changes. So I want to run simulink in command line using "sim" command. The funniest thing here is that the matlab command line is running the entire model at once for all time steps, and even if I give stopTime in sim command, later its not resuming from where it ended but starting simulation from the beginning. This is really very small functionality and makes a huge difference to the real time digital world. Can you please help me with these, or if there is no solution to this can you please recommend matlab in the next release to add the functionality to the command line. I have seen some solutions, but none of them works properly. For example, I saw a code in this link (<http://www.gomatlab.de/simulinkmodell-aus-matlab-heraus-simulieren-t23890.html)>, but it is not working. Could you please help with this.

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

카테고리

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