Error while plotting 3 vectors- Data must be numeric, date time, duration or an array convertible to double.
조회 수: 1 (최근 30일)
이전 댓글 표시
RAHUL AGARWAL
2020년 6월 9일
답변: Sai Sri Harsha Vallabhuni
2020년 6월 9일
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
채택된 답변
Sai Sri Harsha Vallabhuni
2020년 6월 9일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!