本文介绍了如何在MATLAB中绘制三维曲面图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这样的数据集:

I have a dataset like so:

  | 0.1  0.2  0.3  0.4
----------------------
1 | 10   11   12   13
2 | 11   12   13   14
3 | 12   13   14   15
4 | 13   14   15   16

我想在matlab中绘制一个3D曲面图,这样列标题将会在y轴上,行标题将位于x轴上,其余值将确定z轴上点的高度。

I want to plot a 3D surface graph in matlab such that the column headings will be on the y axis, the row headings will be on the x axis and the remaining values will determine the height of the point on the z axis.

我看了一下围绕着很多不同的例子,我无法解决如何实现这个目标。目前我有以下几点:

I have had a look around at lots of different example and I can't work out how to achieve this. At the moment I have got the following:

Y = [0.1 0.2 0.3 0.4];
X = [1 2 3 4];
Z = [10 11 12 13; 11 12 13 14; 12 13 14 15; 13 14 15 16];

有人可以帮我吗?

Please could someone help me out?

推荐答案

surf(X,Y,Z)

这篇关于如何在MATLAB中绘制三维曲面图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 23:51