Adding two axes to a graph - Error message
조회 수: 2 (최근 30일)
이전 댓글 표시
So I have two graphs I want to plot and overlay on each other but each has very different values so I'm trying to add another axis to it however I keep receiving the error message 'Undefined function 'addaxis' for input arguments of type 'double'.
댓글 수: 0
답변 (1개)
Orion
2014년 10월 6일
Hi,
you can use the subplot function, so you can create two axes and plot one variable in each.
t = 0:.01:10;
subplot(2,1,1)
plot(t,cos(t));
subplot(2,1,2)
plot(t,exp(t));
or you can also use plotyy
plotyy(t,cos(t),t,exp(t))
Note : if you want to create a new axe then you have to use the command axes(), but then you need to specify the properties of your axes, which is a bit more complicated.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Two y-axis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!