"John D'Errico" <woodchips@rochester.rr.com> wrote in message <i0fno8$60j$1@fred.mathworks.com>...
> "Niall Heavey" <REMOVEniallALLheaveyCAPLOCKS@gmail.com> wrote in message <i0fl3s$aqc$1@fred.mathworks.com>...
> > Hi all, I am looking to plot a straight forward curve.
> > I thought it would be simple enough to do but I can't find anything to help me so far.
> >
> > Basically I want a curve from point 1 to point 3 that goes through point 2.
> >
> > Sounds simple enough but does anyone know a function available for it?
> >
> > Thanks in advance.
>
> There are infinitely many such curves.
>
> The simplest is a piecewise linear curve, i.e., connect the dots.
> Plot can do it for you.
>
> If you want a better answer than that, you need to tell us, is
> this in two dimensions? Or 3 or more? Must the curve be smooth?
> Is this a single valued relationship, or does the curve wrap around?
>
> John
Its two dimensions, it would be better if it is smooth.
I'd say the easiest way to explain it would be to send the code:
radius = 10;
plot(0,0,'b*')
hold on
i = 4;
for j = 1:i*2
t = linspace(0,2*pi,(i*2)+1);
t = linspace((t(2)/2),((2*pi)(t(2)/2)),(i*2)+1);
r = radius;
A = r*cos(t);
B = r*sin(t);
plot(A(j),B(j),'b*')
% axis ([25 25 25 25])
% axis square
% % text(a(j),b(j),strcat(' User ',num2str(j)))
end
for j = 1:i
t = linspace(0,2*pi,i+1);
r = radius*2;
a = r*cos(t);
b = r*sin(t);
plot(a(j),b(j),'g*')
axis ([25 25 25 25])
axis square
text(a(j),b(j),strcat(' User ',num2str(j)))
end
So basically what i'm trying to do is create a link between the center point and user 1, this would be going through both point A(1),B(1) and A(2),B(2), then the link to user 2 form the center would go through A(3),B(3) and A(4),B(4) and so on.
Hope that makes more sense!
Thanks
