plotting many things in one window
조회 수: 9 (최근 30일)
이전 댓글 표시
Hi,
I have X, which is a 100x100 matrix. I would like to plot each row with respect to the integers 1:100. Of course I could write the following:
Plot(1:100, x(1,:), 1:100, x(2,:), ....)
Is there a shorthand to this ? Thanks
댓글 수: 0
채택된 답변
Star Strider
2015년 1월 6일
One options is to just give it your vector and the matrix:
x = linspace(0,99);
y = rand(100,100);
figure(1)
plot(x, y)
grid
댓글 수: 2
Star Strider
2015년 1월 7일
The matrix doesn’t have to be square. MATLAB will plot it correctly so long as one of its dimensions matches the length of your ‘x’ vector:
t = 1:100;
y = rand(50,100);
figure(1)
plot(t, y)
grid
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!