How to plot simulink data saved to the workplace?

I ran a simulink simulation and I saved the data as a workplace block that includes the time and velocity. I also saved two more workplace blocks data that include time and gear and time and improved gear. I want to plot all three together in a graph with two different y-axis. Thanks for the help!

 채택된 답변

Raj
Raj 2019년 4월 25일

0 개 추천

I assume you want to plot velocity w.r.t time on one side and gear/improved gear w.r.t time on other side of graph. Your code should look something like this:
yyaxis left
plot(time,velocity);
yyaxis right
plot(time,gear,time,improvedgear);
For details see here.

댓글 수: 2

I get this error code: Undefined function or variable 'yyaxis'.
I'm also using MATLAB 2015b.

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

추가 답변 (0개)

카테고리

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

제품

태그

질문:

2019년 4월 25일

댓글:

2019년 4월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by