Error while plotting 3 vectors- Data must be numeric, date time, duration or an array convertible to double.
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
RAHUL AGARWAL
le 9 Juin 2020
Réponse apportée : Sai Sri Harsha Vallabhuni
le 9 Juin 2020
rohit=readtable('rahul11.xlsx')
t = rohit(:,1);
x = rohit(:,2);
u = rohit(:,3);
plot3(t,x,u)
%t,x,u are vectors of size 1*242
0 commentaires
Réponse acceptée
Sai Sri Harsha Vallabhuni
le 9 Juin 2020
t = rohit(:, 1);
x = rohit(:,2);
u = rohit(:,3);
t, x, u are of type table and table datatypes do not have plot method.
Instead you can do
t = rohit.(1);
x = rohit.(2);
u = rohit.(3);
plot3(t, x, u)
Hope this solves your problem.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!