フィルターのクリア

Data must be a single matrix Y or a list of pairs X,Y. Need help on plotting 3D graph!

1 回表示 (過去 30 日間)
array= Tmax/n; %This expends the data points n = 2000 and Tmax = 20
t = 0:array:Tmax; %This sets the time interval
e = 2.71828; %e's true value
y1 = A0*e.^(-LamdaR.*t).*cos(LamdaI.*t); %This is the position function x(t)
y2 = -A0*LamdaI*e.^(-LamdaR*t).*((sin(LamdaI*t)+((LamdaR/LamdaI))*cos(LamdaI*t)));
%equation above is the speed
%equation (dx/dt)
plot(y1,y2,t),xlabel('x'),ylabel('dx/dt'),zlabel('time'),grid;
i am trying to ploy a 3d graph but keep on getting an error that says Data must be a single matrix Y or a list of pairs X,Y. please help?
  3 件のコメント
Walter Roberson
Walter Roberson 2018 年 1 月 17 日
PetronasAMG: if you need privacy for your questions then you should be hiring a consultant. The MATLAB Answers facility is for volunteers sharing questions and solutions; questions remain on the record so that other people with similar questions can learn from the questions and solutions. We volunteers donate our time to help everyone, for the public good, not for the individual good; lack of privacy is the price you have to pay.
Rena Berman
Rena Berman 2018 年 1 月 17 日
(Answers Dev) Restored edit

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2018 年 1 月 16 日
Use the plot3 (link) function instead:
plot3(y1,y2,t),xlabel('x'),ylabel('dx/dt'),zlabel('time'),grid;
  1 件のコメント
Steven Lord
Steven Lord 2018 年 1 月 16 日
Also you should use the exp function instead of trying to define e yourself.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by