Contourf with irregular spaced points
显示 更早的评论
Contourf works if I define X and Y as monotonic increasing values. For eg.,
X=[1:3]; Y=[1:3]; Z=[10 20 30; 40 50 60; 70 80 90]; contourf(X,Y,Z);
Now, when I want to plot using contourf, but with irregular values of X, Y, for the same Z value, how will I go about this? For eg.,
X=[ 1.3 2.2 3.1 1.9 2.7 3.6 2.4 3.2 4.1];
Y=[-0.3 0.1 0.6 -1.2 -0.7 -0.2 -2.1 -1.6 -1.1];
Z=[10 20 30; 40 50 60; 70 80 90]; contourf(X,Y,Z);
The error msg: "The size of X must match the size of Z or the number of columns of Z."
Thanks,
Ganesh
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!