我正在尝试逐行绘制矩阵。我想绘制的第一行然后在它旁边我想绘制下一行信息。这是一个大矩阵,它是 287x6。感谢您的帮助。
问问题
143 次
2 回答
0
Do you want something like a surface plot, or just a large set of line plots? Depending on what your data represents, different approaches are of course more or less appropriate.
For line plots, you could do something like
figure, hold on
for row=1:size(A,1)
plot(A(row,:))
end
although I doubt that would be legible. To do a surface plot, the easiest is just to do
surf(A)
in which case you'll have row index on one axis, column index on the other, and the matrix element values on the z axis.
于 2013-04-17T19:29:44.043 回答
0
>> m = magic(10);
>> s = size(m);
>> for i=1:s(1)
plot(i,m(i,:),'o'); hold on
end
于 2013-04-17T19:35:42.430 回答