>> !vi [function].m
Hint: Square brackets are used here to denote general items for the user as to type in actual names when actually used in MATLAB, such as "[function]", but in MATLAB square brackets are also used for marking arrays that are being initialized on assignment.
Hints : The percent sign "%" marks the beginning of a comment, so if a "%" appears in a line (except as a format specifier in a "fprintf" or "sprintf" argument, its other purpose), the rest of the line to the right is a comment, but the first set of lines marked at the beginning of the line before any MATLAB commands are Header lines that are listed when you use the MATLAB "help" command:
>> help [function]
>> lookfor [keyword]
Hints: The semicolon ";" at the end of a MATLAB command line suppressed MATLAB output for that command, but semicolon are also used for separating rows in array initialization forms.
>> circle
>> type circle.m
% Circle - Script file to draw unit circle
% modified from "Getting Started with MATLAB" by Rudra Pratap 9/14/94
format compact % tightens loose format
format long e % makes numerical output in double precision
theta = linspace(0,2*pi,100); % create vector theta
x = cos(theta); % generate x-coordinate
y = sin(theta); % generate y-coordinate
plot(x,y); % plot circle
axis('equal'); % set equal scale on axes per pixel
title('Circle of unit radius') % put title
c=2*pi % prints out 2*pi value
disp('end circle.m') % prints out literal string.
% End Circle
Email Comments or Questions to hanson@uic.edu