NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/plots/arc.m

Revision 495 (checked in by cbc, 12 years ago)

Initial import of Stark code.

Line 
1 function z=arc(z0,r,n,a1,a2)
2 %function z=arc(z0,r,n,a1,a2)   create arc with center z0, radius r
3 %Arc of a circle with center z0, radius r and angle going from
4 %  a1 to a2 in radians.  n is the number of points on the arc returned.
5 %Example: axis('square')
6 %         plot(arc(i,.5,25,pi/4,pi/2))
7 %
8 % Calls: none
9 t=a1:(a2-a1)/n:a2;
10 z=z0+r*exp(i*t);
Note: See TracBrowser for help on using the browser.