Combine arrays
조회 수: 1 (최근 30일)
이전 댓글 표시
In order to visualise my simulation i want to plot some results. During my simulation i created multiple arrays of the size= 96x1, 96x3, 96x5.
Want i want to achieve is to combine these arrays into a single 96x9 array as i see no other way to plot them all into one graph.
Can anyone help? :
Thank you,
Kris
댓글 수: 0
채택된 답변
Kye Taylor
2012년 6월 12일
@Sean's answer is great. (That's my vote up there...)
To suggest other ways to plot arrays on the same axis, try
Approach 1)
figure, hold on
plot(x1)
plot(x2)
plot(x3)
Approach 2.)
plot(1:length(x1),x2,1:length(x2),x2,1:length(x3),x3)
댓글 수: 2
Sean de Wolski
2012년 6월 12일
don't hold on
figure;
plot(x1)
Now either make a new figure and plot(x2) or just call plot(x2) and plot(x1) will be overwritten.
추가 답변 (2개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!