Table of Contents


Two-Dimensional Graphics

---------------------------------------------------------------
Elementary X-Y Graphs                                            
---------------------------------------------------------------
fill                   Draw filled 2-D polygons.                 
loglog                 Log-log scale plot.                       
plot                   Linear plot.                              
semilogx               Semi-log scale plot, x-axis logarithmic.  
semilogy               Semi-log scale plot, y-axis logarithmic.  
---------------------------------------------------------------
-------------------------------------------------------------
Specialized X-Y Graphs                                         
-------------------------------------------------------------
bar                     Bar graph.                             
comet                   Animated comet plot.                   
compass                 Compass plot.                          
errorbar                Error bar plot.                        
feather                 Feather plot.                          
fplot                   Plot function.                         
hist                    Histogram plot.                        
polar                   Polar coordinate plot.                 
rose                    Angle histogram plot.                  
stairs                  Stairstep plot.                        
stem                    Stem plot for discrete sequence data.  
-------------------------------------------------------------
------------------------------------------
Graph Annotation                            
------------------------------------------
grid              Grid lines.               
gtext             Mouse placement of text.  
legend            Add legend to plot.       
text              Text annotation.          
title             Graph title.              
xlabel            X-axis label.             
ylabel            Y-axis label.             
------------------------------------------
-------------------------------------------------------------
Coordinate System Conversion                                   
-------------------------------------------------------------
cart2pol                      Cartesian to polar coordinates.  
pol2cart                      Polar to Cartesian coordinates.  
-------------------------------------------------------------
---------------------------------------------------------
Miscellaneous                                              
---------------------------------------------------------
zoom           Zoom in and out of a two-dimensional plot.  
---------------------------------------------------------

Three-Dimensional Graphics

---------------------------------------------------------------------------------
Line and Area Fill Commands                                                        
---------------------------------------------------------------------------------
fill3                        Draw filled three-dimensional polygons in 3-D space.  
plot3                        Plot lines and points in three-dimensional space.     
---------------------------------------------------------------------------------
------------------------------------------------------------------------------------
Contour and Other 2-D Plots of 3-D Data                                               
------------------------------------------------------------------------------------
clabel                                   Contour plot elevation labels.               
comet3                                   Three-dimensional animated comet plot.       
contour                                  Contour plot.                                
contour3                                 Three-dimensional contour plot.              
contourc                                 Contour plot computation (used by contour).  
image                                    Display image.                               
imagesc                                  Scale data and display as image.             
pcolor                                   Pseudocolor (checkerboard) plot.             
quiver                                   Quiver plot.                                 
slice                                    Volumetric slice plot.                       
------------------------------------------------------------------------------------
-----------------------------------------------------------------------
Surface and Mesh Plots                                                   
-----------------------------------------------------------------------
mesh                    Three-dimensional mesh surface.                  
meshc                   Combination mesh/contour plot.                   
meshz                   Three-dimensional mesh with zero plane.          
slice                   Volumetric visualization plot.                   
surf                    Three-dimensional shaded surface.                
surfc                   Combination surf/contour plot.                   
surfl                   Three-dimensional shaded surface with lighting.  
waterfall               Waterfall plot.                                  
-----------------------------------------------------------------------
------------------------------------------------------------------
Graph Appearance                                                    
------------------------------------------------------------------
axis              Axis scaling and appearance.                      
caxis             Pseudocolor axis scaling.                         
colormap          Color lookup table.                               
hidden            Mesh hidden line removal mode.                    
shading           Color shading mode.                               
view              Three-dimensional graph viewpoint specification.  
viewmtx           View transformation matrices.                     
------------------------------------------------------------------
-----------------------------------------------------------
Graph Annotation                                             
-----------------------------------------------------------
grid              Grid lines.                                
legend            Add legend to plot.                        
text              Text annotation.                           
title             Graph title.                               
xlabel            X-axis label.                              
ylabel            Y-axis label.                              
zlabel            Z-axis label for three-dimensional plots.  
-----------------------------------------------------------
-------------------------------
3-D Objects                      
-------------------------------
cylinder     Generate cylinder.  
sphere       Generate sphere.    
-------------------------------
-------------------------------------------------------------
Coordinate System Conversion                                   
-------------------------------------------------------------
cart2sph                      Cartesian to polar coordinates.  
sph2cart                      Polar to Cartesian coordinates.  
-------------------------------------------------------------

Graphics Functions

-----------------------------------------------------------------------------------------
Figure Window Creation and Control                                                         
-----------------------------------------------------------------------------------------
capture                             Screen capture of current figure (UNIX only).          
clf                                 Clear current figure.                                  
close                               Close figure.                                          
figure                              Create Figure (graph window).                          
gcf                                 Get handle to current figure.                          
graymon                             Set default figure properties for grayscale monitors.  
newplot                             Determine correct axes and figure for new graph.       
refresh                             Redraw current figure window.                          
whitebg                             Toggle figure background color.                        
-----------------------------------------------------------------------------------------
---------------------------------------------------------------
Axis Creation and Control                                        
---------------------------------------------------------------
axes                       Create axes in arbitrary positions.   
axis                       Control axis scaling and appearance.  
caxis                      Control pseudocolor axis scaling.     
cla                        Clear current axes.                   
gca                        Get handle to current axes.           
hold                       Hold current graph.                   
ishold                     True if hold is on.                   
subplot                    Create axes in tiled positions.       
---------------------------------------------------------------
-------------------------------------------------------
Handle Graphics Objects                                  
-------------------------------------------------------
axes                     Create axes.                    
figure                   Create figure window.           
image                    Create image.                   
line                     Create line.                    
patch                    Create patch.                   
surface                  Create surface.                 
text                     Create text.                    
uicontrol                Create user interface control.  
uimenu                   Create user interface menu.     
-------------------------------------------------------
------------------------------------------------------------------
Handle Graphics Operations                                          
------------------------------------------------------------------
delete                      Delete object.                          
drawnow                     Flush pending graphics events.          
findobj                     Find object with specified properties.  
gco                         Get handle of current object.           
get                         Get object properties.                  
reset                       Reset object properties.                
rotate                      Rotate an object.                       
set                         Set object properties.                  
------------------------------------------------------------------
----------------------------------------------------------------
Dialog Boxes                                                      
----------------------------------------------------------------
uigetfile     Retrieve name of file to open through dialog box.   
uiputfile     Retrieve name of file to write through dialog box.  
----------------------------------------------------------------
--------------------------------------------------------
Hardcopy and Storage                                      
--------------------------------------------------------
orient                Set paper orientation.              
print                 Print graph or save graph to file.  
printopt              Configure local printer defaults.   
--------------------------------------------------------
-----------------------------------------------------
 Movies and Animation                                  
-----------------------------------------------------
getframe               Get movie frame.                
movie                  Play recorded movie frames.     
moviein                Initialize movie frame memory.  
-----------------------------------------------------
----------------------------------------------------------
Miscellaneous                                               
----------------------------------------------------------
ginput              Graphical input from mouse.             
ishold              Return hold state.                      
rbbox               Rubberband box for region selection.    
waitforbuttonpress  Wait for key/button press over figure.  
----------------------------------------------------------

Color Control and Lighting Model Functions

------------------------------------------
 Color Controls                             
------------------------------------------
caxis            Pseudocolor axis scaling.  
colormap         Color lookup table.        
shading          Color shading mode.        
------------------------------------------
------------------------------------------------------------
Colormaps                                                     
------------------------------------------------------------
bone       Gray-scale with a tinge of blue colormap.          
contrast   Contrast-enhancing grayscale colormap.             
cool       Shades of cyan and magenta colormap.               
copper     Linear copper-tone colormap.                       
flag       Alternating red, white, blue, and black colormap.  
gray       Linear grayscale colormap.                         
hsv        Hue-saturation-value colormap.                     
hot        Black-red-yellow-white colormap.                   
jet        Variation of HSV colormap (no wrap).               
pink       Pastel shades of pink colormap.                    
prism      Prism colors colormap.                             
white      All white monochrome colormap.                     
------------------------------------------------------------
-------------------------------------------------------------------------------
Color Map Related Functions                                                      
-------------------------------------------------------------------------------
brighten                     Brighten or darken color map.                       
colorbar                     Display colormap as color scale.                    
hsv2rgb                      Hue-saturation-value to red-green-blue conversion.  
rgb2hsv                      Red-green-blue to hue-saturation-value conversion.  
rgbplot                      Plot color map.                                     
spinmap                      Spin color map.                                     
-------------------------------------------------------------------------------
----------------------------------------------------------------
Lighting Models                                                   
----------------------------------------------------------------
diffuse          Diffuse reflectance.                             
specular         Specular reflectance.                            
surfl            Three-dimensional shaded surface with lighting.  
surfnorm         Surface normals.                                 
----------------------------------------------------------------

Sound Processing Functions

----------------------------------------------------
 General Sound Functions                              
----------------------------------------------------
saxis                     Sound axis scaling.         
sound                     Convert vector into sound.  
----------------------------------------------------
-------------------------------------------------------------------
SPARCstation-specific Sound Functions                                
-------------------------------------------------------------------
auread                                 Read Sun audio file.          
auwrite                                Write Sun audio file.         
lin2mu                                 Linear to mu-law conversion.  
mu2lin                                 Mu-law to linear conversion.  
-------------------------------------------------------------------
-----------------------------------------------------------------
.WAV Sound Functions                                               
-----------------------------------------------------------------
wavread               Load MS-Windows 3.1 .WAV format sound file.  
wavwrite              Save MS-Windows 3.1 .WAV format sound file.  
-----------------------------------------------------------------

Character String Functions

------------------------------------------------------------
General                                                       
------------------------------------------------------------
abs      Convert string to numeric values.                    
blanks   Create string of blanks.                             
deblank  Remove trailing blanks and null spaces from string.  
eval     Execute string with MATLAB expression.               
findstr  Find one string within another.                      
isstr    True for string.                                     
setstr   Convert numeric values to string.                    
str2mat  Form text matrix from individual strings.            
string   About character strings in MATLAB.                   
strrep   String search and replace.                           
strtok   First token in string.                               
------------------------------------------------------------
-------------------------------------------------
String Comparison                                  
-------------------------------------------------
isletter           True for alphabetic character.  
lower              Convert string to lower case.   
strcmp             Compare strings.                
upper              Convert string to upper case.   
-------------------------------------------------
----------------------------------------------------------------------------
 String to Number Conversion                                                  
----------------------------------------------------------------------------
int2str                       Convert integer to string.                      
num2str                       Convert number to string.                       
sprintf                       Convert number to string under format control.  
sscanf                        Convert string to number under format control.  
str2num                       Convert string to number.                       
----------------------------------------------------------------------------
-----------------------------------------------------------------------------------
Hexadecimal to Number Conversion                                                     
-----------------------------------------------------------------------------------
dec2hex                           Convert decimal integer to hex string.             
hex2dec                           Convert hex string to decimal integer.             
hex2num                           Convert hex string to IEEE floating-point number.  
-----------------------------------------------------------------------------------

Low-level File I/O Functions

-------------------------------------
File Opening and Closing               
-------------------------------------
fclose                    Close file.  
fopen                     Open file.   
-------------------------------------
--------------------------------------------
Unformatted I/O                               
--------------------------------------------
fread            Read binary data from file.  
fwrite           Write binary data to file.   
--------------------------------------------
--------------------------------------------------------------
Formatted I/O                                                   
--------------------------------------------------------------
fgetl          Read line from file, discard newline character.  
fgets          Read line from file, keep newline character.     
fprintf        Write formatted data to file.                    
fscanf         Read formatted data from file.                   
--------------------------------------------------------------
------------------------------------------------
File Positioning                                  
------------------------------------------------
feof              Test for end-of-file.           
ferror            Inquire file I/O error status.  
frewind           Rewind file.                    
fseek             Set file position indicator.    
ftell             Get file position indicator.    
------------------------------------------------
----------------------------------------------------
String Conversion                                     
----------------------------------------------------
sprintf            Write formatted data to string.    
sscanf             Read string under format control.  
----------------------------------------------------
------------------------------------------------------------------------
Specialized File I/O                                                      
------------------------------------------------------------------------
csvread               Read a file of comma separated values.              
csvwrite              Write a file of comma separated values.             
uigetfile             Retrieve name of file to open through dialog box.   
uiputfile             Retrieve name of file to write through dialog box.  
wk1read               Read a Lotus123 WK1 spreadsheet file.               
wk1write              Write a Lotus123 WK1 spreadsheet file.              
------------------------------------------------------------------------

Commands and Functions

This section of the guide contains a description of the operators in MATLAB, followed by detailed descriptions of all MATLAB commands and functions, in alphabetical order. Online help is also available -- if you execute help on one of the function names, MATLAB displays an abbreviated version of the reference entry.

Each reference entry contains a purpose, synopsis, description, examples, algorithm, references, and other entries to see.