circleposition.m 238 B

123456789
  1. function [xunit yunit] = circleposition(x,y,r,d)
  2. %x and y are coordinates for the center and r = radius d= number of point
  3. th = 0:pi/(d/2):2*pi;
  4. th=th(1:end-1);
  5. xunit = r * cos(th) + x;
  6. yunit = r * sin(th) + y;
  7. % plot(xunit, yunit);
  8. end