Data must be a single matrix Y or a list of pairs X,Y. Need help on plotting 3D graph!
4 views (last 30 days)
Show older comments
PetronasAMG on 16 Jan 2018
Commented: Rena Berman on 17 Jan 2018
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
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?
Star Strider on 16 Jan 2018
Use the plot3 (link) function instead:
Steven Lord on 16 Jan 2018
Also you should use the exp function instead of trying to define e yourself.
More Answers (0)
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!