2010-09-16 60 views

回答

3

The MathWorks文檔的簡單副本。欲瞭解更多詳情,請看this

% Create a sphere and color it using a topographic colormap: 
cla reset; 
load topo; 
[x y z] = sphere(45); 
s = surface(x,y,z,'FaceColor','texturemap','CData',topo); 
colormap(topomap1); 
% Brighten the colormap for better annotation visibility: 
brighten(.6) 
% Create and arrange the camera and lighting for better visibility: 
campos([2 13 10]); 
camlight; 
lighting gouraud; 
axis off vis3d; 
% Set the x- and y-coordinates of the textarrow object: 
x = [0.7698 0.5851]; 
y = [0.3593 0.5492]; 
% Create the textarrow object: 
txtar = annotation('textarrow',x,y,'String','We are here.','FontSize',14); 
2

添加箭頭等簡單的方法是使用繪圖工具。您可以通過單擊包含您繪製的圖形的窗口工具欄上最右側的圖標激活繪圖工具。一旦你有了箭頭,你就可以從圖形中生成m文件。