Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
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

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Line Plots finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by