From: Plotino Rhodokanaty on
Hello,

I would like to ask the community, if there is a way, I could plot a circle by using the LINE command. Two points of the cartesian surface are given, the one is supposed to be the centre and the other a point of the circle. So the distance between them is obviously the radius... how on earth can I draw a circle by using LINE? As it is part of my homework, I am not supposed to use any other commands.

Thanks in Advance,
Plotino
From: ImageAnalyst on
Plotino Rhodokanaty:
Well hopefully you can use a for loop to draw lines between pairs of
points, and trig functions like sind() and cosd() to get those points
as you sweep the angle around 360 degrees. If you can do that, it's
cake. Just loop over angles, getting x,y pairs (x1,y1 and x2,y2 using
sind and cosd) and use line to draw a line through each pair that you
generate (each iteration can generate a pair of points of course).
It's so simple I can't really say much more without actually doing it
for you.
From: Plotino Rhodokanaty on
Thank you Image Analyst, but I forgot to mention, that loops are also prohibited! Do you think it is possible doing so by using vectors instead?
From: us on
"Plotino Rhodokanaty" <plotinorhodokanaty(a)rocketmail.com> wrote in message <hr1v4t$t7o$1(a)fred.mathworks.com>...
> Thank you Image Analyst, but I forgot to mention, that loops are also prohibited! Do you think it is possible doing so by using vectors instead?

yes, of course...
as a matter of fact, it's the preferred way for CSSMers...

us
From: Walter Roberson on
Plotino Rhodokanaty wrote:
> Thank you Image Analyst, but I forgot to mention, that loops are also
> prohibited! Do you think it is possible doing so by using vectors instead?

v1 = [First_Vector];
v2 = [Second_Vector];
f1 = @First_Function;
f2 = @Second_Function;
plot(f1(v1),f2(v2));

Appropriate values for the vectors and the functions are left for you to
fill in.