MATLAB: How to set an equal distance of 5 units between the red star points

plotwsn

Hello everybody… I want to set an equal and fixed distance(5 units) between red star points in the whole figure(the three circles) in my attached code… How can I do it?? Please help me.Thanks in advance:)

Best Answer

You can set up points at equal angles using code in the FAQ. http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F However if you want the angles to be such that the arc length between the points is exactly 5 then the first and last point, near 0 and 2*pi, may not have an arc length of 5 between them unless the circumference is a multiple of 5. So it won't work for any arbitrary radius. If a spacing of 5 for nearly all pairs of points except for one pair is good enough for you, then see the 5th code chunk in the FAQ.