0
如何在不使用衝浪的情況下進行矩陣的線圖(如A = rand(5))?Matlab中的線圖
如何在不使用衝浪的情況下進行矩陣的線圖(如A = rand(5))?Matlab中的線圖
如果你想在2D情節分別繪製每一列,你只寫
plot(A)
如果你想用線條3D繪圖,你可以寫:
[xx,yy] = ndgrid(1:6,1:5);
A = [A;NaN(1,size(A,2))]; %# add NaNs so that the lines will be plotted separately
plot3(xx(:),yy(:),A(:)) %# use plot3(xx(:),yy(:),A(:),'.') if you want to plot dots instead of lines.