matlab 画图contour3命令的问题 悬赏50分 解决好了可以追加分数

来源:百度知道 编辑:UC知道 时间:2024/06/14 17:46:10
matlab 画图contour3命令的问题。我想画个三维浓度梯度图。水平坐标X,Y。垂直各点的坐标H 放到了一个三维数组中(因为要表现出时间T来,X,Y对应的H各不相同)然后浓度con在一个4维数组中()。我打的命令是contour3(x,y,h,con(:,:,2,:))。 报错??? Error using ==> contour3
The length of X must match the number of columns of Z. 不知道如何改动。请大家帮忙

加一句在前面:
[X,Y]=meshgrid(x,y)
然后
contour3(X,Y,h,con(:,:,2,:));

Error using ==> contour3
The length of X must match the number of columns of Z.

应该是你输入的x和z的数量不匹配。不是一一对应的。你可以再确认下,有没有把数值输错。