Azzera filtri
Azzera filtri

Error while plotting 3 vectors- Data must be numeric, date time, duration or an array convertible to double.

1 visualizzazione (ultimi 30 giorni)
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

Risposta accettata

Sai Sri Harsha Vallabhuni
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.

Più risposte (0)

Categorie

Scopri di più su Line Plots in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by