Matlab simulink toworkspace block plot problem?
이전 댓글 표시
I have problem with the plot. I want to plot the graphics from simulink with the to workspace block. It is plotting but the time axis is starting from wrong value. For example my time is 3 , it must be plotted from zero to 3 but it is plotting 2.7 to 3. This is wrong. How can I fix this? Can you help me?
답변 (1개)
Azzi Abdelmalek
2013년 5월 26일
plot(t,y) % should start at 0
댓글 수: 4
Azzi Abdelmalek
2013년 5월 26일
Can you post your simulink model? or give more informations about your model
Mustafa Ertay
2013년 5월 26일
Azzi Abdelmalek
2013년 5월 26일
The time vector and your signal should have the same length, instead of to workspace block, use a scope, then set the properties of your scope like below:
- in History uncheck Limit data points to last and check save data to workspace , and set variable name to data
- simulate your system then, in workspace type
t=data.time;
y=data.signals.values
plot(t,y)
Mustafa Ertay
2013년 5월 27일
카테고리
도움말 센터 및 File Exchange에서 Scopes and Data Logging에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!