Error Using Surface Plot
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Walter Roberson
am 2 Mai 2017
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 Kommentare
Siehe auch
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!