How can i ploting 3 function with 2 variables?

3 Ansichten (letzte 30 Tage)
mostafa
mostafa am 15 Apr. 2014
Kommentiert: mostafa am 15 Apr. 2014
Hi i have 3 function like this
x1=(5+sin(w1*t))*cos(w2*t), x2=(5+sin(w1*t))*sin(w2*t), x3=cos(w1*t)
the t variable is not important for me but w1 and w2 is change like this
w1/w2=4, w1/w2=0.25, w1/w2=5 ....
i want to plot this 3 function in 3D but i cant!!!!!!
  6 Kommentare
Patrik Ek
Patrik Ek am 15 Apr. 2014
Ok, the largest error is that t is always equal to 0. Why you plot a point on the same place 20 times: but changing t to t = 1 and looking at the graph, makes still no sense to me. It may do for you, but if you do not mind, what are you trying to plot. You should check the help, but what you are doing is not plotting 3 grahps in 3d, but plotting one graph with the coordinate x1, x2, x3 (x,y,z). You said t is not important, but why is it used then?
mostafa
mostafa am 15 Apr. 2014
Bearbeitet: mostafa am 15 Apr. 2014
thank u for your respond Patrik. i meant that the t variable is not important for me not the whole. i think by saying that i need the points i made a mistake. these functions should give me curve. its about chaos and non linearity dynamics. by the way the t variable should grow not being a constant.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Patrik Ek
Patrik Ek am 15 Apr. 2014
Ok this seems to give some chaotic pattern.
t = 0:0.01:2*pi;
w2=linspace(0,20,length(t));
w1=4*w2;
m=w1.*t;
n=w2.*t;
x1=(5+sin(m)).*cos(n);
x2=(5+sin(m)).*sin(n);
x3=cos(m);
plot3(x1,x2,x3);

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by