看板 MATLAB 關於我們 聯絡資訊
min=-10; inter=0.4; max=-10; [X,Y]=meshgrid(min:inter:max); Z=cos(X).*cos(Y).*exp(-sqrt(X.^2+Y.^2)./4); surf(X,Y,Z); 以上是我要畫的3D圖 可是出現錯誤 Z must be a matrix, not a scalar or vector. 想請教那裏有問題 這是一本新買的matlab書裡面的例題 懇請指導 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.116.133.39
rex0707:min=max=-10 05/01 00:13
okgogogo:X,Y,Z 都是1x1 要surf?......max應該是10 05/01 00:17
bofongwang:謝謝@@ 我好蠢 05/01 00:19
vincent59:多練習就會更好 05/01 00:57