Problem in x and y trajectory.

조회 수: 1 (최근 30일)
Muhammad Shoaib
Muhammad Shoaib 2015년 12월 18일
답변: Carlos Guerrero García 2022년 12월 2일
I want to make 3D trajectory of x and y, i have tried it in 2D but nothing is displayed using the plot here is my code.
X=1;
Y=0;
Z=1;
X=-10*X+10*Y;
Y=28*X-Y-X*Y;
Z=-(8/3)*Z+X*Y;
v0 = 2; % velocity
T = 5000; % time
t = 0:0.01:T;
x = v0* cos(Z);
y = v0* sin(Z);
figure,plot(x,t,y,t);

답변 (1개)

Carlos Guerrero García
Carlos Guerrero García 2022년 12월 2일
After the first (x,y,z)=(1,0,1) assignment, the lines before velocity states (X,Y,Z)=(-10,-280; 280-8/3)=(-10,-280,832/3), and so, in the last part of your code, (x,y) are constant values, independent of the t values.
I don't know what is the trajectory you're trying to plot

카테고리

Help CenterFile Exchange에서 3-D Scene Control에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by