Error Using Surface Plot
5 ビュー (過去 30 日間)
古いコメントを表示
Trying to make a three dimensional plot, with the third array being a function of the first two (long,lat,altitude for example).
To try get the syntax right, I am using a practice script.
Why would using the surf function following meshgrid on three variables not work?
q = [1:.1:15];
w = [1:.1:15];
zz = [1:.1:15];
[Q, W, ZZ] = meshgrid(q,w,zz);
figure(2)
surf(Q,W,ZZ)
colorbar
0 件のコメント
回答 (1 件)
Walter Roberson
2017 年 5 月 2 日
Your Q, W, and ZZ variables are going to be 3D because you are using meshgrid() on 3 inputs.
The three inputs to surf() need to be 2D.
surf() cannot be used to create volume plots.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!