###### Matlab Tutorials —— "surf"

"Plot" function is used to draw lines. When it comes to surfaces, we need "surf".

Here gives an example:

% Start
theta = linspace(0, 10*pi, 100);
c = cos(theta/5);
z = c' * c;

figure(1);
surf(z); % create a surface using data from z and their x, y axes will follow the matrix coordinate of z

figure(2);
surf(theta, theta, z); % create a surface using data from z with given x, y axes
colorbar; % add colorbar to show how colors represent numbers

figure(3);
surf(z, ... % some propeties of a surface
'FaceAlpha', 0.8, ... % Transparency
'FaceColor', 'interp', ... % Face color style
'EdgeColor', 'none', ... % Edge color,'none' means no edge.
'LineStyle', ':' ... % line style, but it's actually useless here since there is no edge
);


Appendix may be needed:

Edge line color, specified as one of the values listed here.The default color of [0 0 0] corresponds to blackedges.

ValueDescription
'none'Do not draw the edges.
'flat'

Use a different color for each edge based on the valuesin the CData property. First you must specifythe CData property as a matrix the same size as ZData.The color value at the first vertex of each face (in the positive x and y directions)determines the color for the adjacent edges. You cannot use this valuewhen the EdgeAlpha property is set to 'interp'.

'interp'

Use interpolated coloring for each edge based on the values in the CData property. First you must specify the CData property as a matrix the same size as ZData. The color varies across each edge by linearly interpolating the color values at the vertices. You cannot use this value when the EdgeAlpha property is set to 'flat'.

RGB triplet or color name

Use the specified color for all the edges. This option does not use the color values in the CData property.

An RGB triplet is a three-element row vector whose elements specify the intensities of the red, green, and blue components of the color. The intensities must be in the range [0,1]; for example, [0.4 0.6 0.7]. Alternatively, you can specify some common colors by name. This table lists the long and short color name options and the equivalent RGB triplet values.

OptionDescriptionEquivalent RGB Triplet
'red' or 'r'Red[1 0 0]
'green' or 'g'Green[0 1 0]
'blue' or 'b'Blue[0 0 1]
'yellow' or 'y'Yellow[1 1 0]
'magenta' or 'm'Magenta[1 0 1]
'cyan' or 'c'Cyan[0 1 1]
'white' or 'w'White[1 1 1]
'black' or 'k'Black[0 0 0]

### 'LineStyle' — Line style'-' (default) | '--' | ':' | '-.' | 'none'

Line style, specified as one of the options listed in this table.

Line StyleDescriptionResulting Line
'-'Solid line

'--'Dashed line

':'Dotted line

'-.'Dash-dotted line

'none'No lineNo line

'FaceColor'Face color

### 'flat' (default) | 'interp' | 'none' | 'texturemap' | RGB triplet | 'r' | 'g' | 'b' | ...

Face color, specified as one of the values in this table.

ValueDescription
'flat'

Use a different color for each face based on the valuesin the CData property. First you must specifythe CData property as a matrix the same size as ZData.The color value at the first vertex of each face (in the positive x and y directions)determines the color for the entire face. You cannot use this valuewhen the FaceAlpha property is set to 'interp'.

'interp'

Use interpolated coloring for each face based on the values in the CData property. First you must specify the CData property as a matrix the same size as ZData. The color varies across each face by interpolating the color values at the vertices. You cannot use this value when the FaceAlpha property is set to 'flat'.

RGB triplet or color name

Use the specified color for all the faces. This option does not use the color values in the CData property.

'texturemap'Transform the color data in CData so thatit conforms to the surface.
'none'Do not draw the faces.

#### SURF算法代码 matlab

2014年06月04日 1.36MB 下载

#### surf算法-MATLAB源码

2017年03月24日 706KB 下载

#### SURF算法matlab实现

2016-11-15 22:24:52

#### Matlab中mesh和surf的区别

2014-10-16 16:31:49

#### 一分钟了解"matlab绘3D图_mesh和surf以及其区别"

2017-09-13 10:12:53

#### 基于SIFT和SURF的遥感图像配准matlab代码

2016年06月03日 2.93MB 下载

#### 物体检测SURF算法matlab实现

2016-04-22 23:46:54

#### MATLAB画图SURF函数颜色控制参数C用法

2016-11-02 11:58:21

#### SURF源码(matlab版).rar

2015年04月20日 1.3MB 下载

#### matlab函数——meshgrid、mesh、surf函数

2015-09-07 15:46:49

## 不良信息举报

Matlab Tutorials —— "surf"