Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
ploting point to point

Subject: ploting point to point

From: parham

Date: 28 Jun, 2009 14:56:28

Message: 1 of 9

hi
how can I plot for example y=sin(x) so that matlab draws the curve point to point.I mean I dont want it in a time but I want it plots first x(1),y(1) then x(2),y(2) then x(3),y(3) ....

Subject: ploting point to point

From: Faraz Afzal

Date: 28 Jun, 2009 15:21:01

Message: 2 of 9

Hello Parham..


hmm... good questions...

try this...


x = -2*pi: pi/10 : 2*pi;

for q = 1:length(x);
    y(q) = sin(x(q));
    plot(x(q),y(q), 'ro')
    hold on
end
 
If this is what u want... do not forget to say thanx ... :o)))

Regards.

Faraz
parham <parham_iut@yahoo.com> wrote in message <18379773.42104.1246201019384.JavaMail.jakarta@nitrogen.mathforum.org>...
> hi
> how can I plot for example y=sin(x) so that matlab draws the curve point to point.I mean I dont want it in a time but I want it plots first x(1),y(1) then x(2),y(2) then x(3),y(3) ....

Subject: ploting point to point

From: parham

Date: 28 Jun, 2009 16:04:59

Message: 3 of 9

hi
thank you very much.are you iranian?

Subject: ploting point to point

From: Faraz Afzal

Date: 28 Jun, 2009 16:56:01

Message: 4 of 9

Hi..


Hmm..... Naaa I am not iranian..

I m from PAKISTAN... !!!

PAKISTANIAN .. :o))

Reagrds,,

Muhammad Faraz Afzal

parham <parham_iut@yahoo.com> wrote in message <9084614.42350.1246205130870.JavaMail.jakarta@nitrogen.mathforum.org>...
> hi
> thank you very much.are you iranian?

Subject: ploting point to point

From: parham

Date: 28 Jun, 2009 18:07:04

Message: 5 of 9

my question was this
x = -2*pi: pi/100 : 2*pi;
for q = 1:length(x);
y(q) = sin(x(q));
plot(x(q),y(q),'Marker','o')
M(q)=getframe;
hold on
end
movie(M,4)
and your help cause that I can solve it.thank you very much.I am iranian,your name is like iranian name,anyway thank you veryyyy much

Subject: ploting point to point

From: parham

Date: 28 Jun, 2009 18:08:01

Message: 6 of 9

my question was this
x = -2*pi: pi/100 : 2*pi;
for q = 1:length(x);
y(q) = sin(x(q));
plot(x(q),y(q),'Marker','o')
M(q)=getframe;
hold on
end
movie(M,4)
and your help cause that I can solve it.thank you very much.I am iranian,your name is like iranian name,anyway thank you veryyyy much

Subject: ploting point to point

From: Sasan

Date: 28 Jun, 2009 20:10:50

Message: 7 of 9

On Jun 28, 10:08 pm, parham <parham_...@yahoo.com> wrote:
> my question was this
> x = -2*pi: pi/100 : 2*pi;
> for q = 1:length(x);
> y(q) = sin(x(q));
> plot(x(q),y(q),'Marker','o')
> M(q)=getframe;
> hold on
> end
> movie(M,4)
> and your help cause that I can solve it.thank you very much.I am iranian,your name is like iranian name,anyway thank you veryyyy much

hi
Dear Parham
if you want draw plot and see drawing ,comet function lead to best
result,for example
x = -2*pi: pi/1000 : 2*pi;
y=sin(x)
comet(x,y,0.4)
so .... I think you training hard for your exam but movie function is
not in base text(getting started)...
good luck

Subject: ploting point to point

From: parham

Date: 29 Jun, 2009 05:15:40

Message: 8 of 9

thank you very much.you are exactly right

Subject: ploting point to point

From: parham

Date: 29 Jun, 2009 05:16:12

Message: 9 of 9

thank you very much.you are exactly right

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us