필터 지우기
필터 지우기

How to keep same time range when sending data form Simulink to Matlab?

조회 수: 2 (최근 30일)
hi, I am Simulating a model in simulink and want to plot a graph of the output in MatLAB, but when i send it to MatLAB the time range changes, for example, when its in Simulink, its 300 seconds but when sent to MatLAB its 1200 seconds, basically I want the same response from the scope only in MatLAB.
Thanks
Johnny

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 5월 2일
I suspect you are viewing partial of your curve in Simulink scope. See this post: http://www.mathworks.com/matlabcentral/answers/5591-scope-time-not-shown-to-full-simlation
You may have ploted your curve in Matlab without time so your x-axle is just number of data samples. By default, the simulation time is sent to the workspace as "tout", so try, plot(tout, YourVariable). You can change this by click menu:
Simulation-> Configuration parameters ... -> Data Import/Export
  댓글 수: 4
Johnny
Johnny 2011년 5월 2일
thanks very much guys, that was great help. its for my final year project so it needs to be perfect.
johnny
papan dey
papan dey 2013년 2월 6일
i have generated simulink figure and can convert it in matlab using plot(signal) . now if i want to take the graph between a time limit such as 0.2s t0 0.5s, which command should i write?

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

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by