Error using plot Invalid data argument.
조회 수: 8 (최근 30일)
이전 댓글 표시
This is my program. Need help to solve it.
clc;
t = readtable('error graph.xlsx','Sheet','Sheet1');
x = t.ModelName;
y = t.Rmse;
z = t.R_2;
plot(x,y)
hold on
plot(x,z)
hold on
댓글 수: 0
답변 (2개)
Walter Roberson
2024년 9월 21일
I would guess that you need
plot(categorical(x), y)
and
plot(categorical(x), z)
댓글 수: 0
Voss
2024년 9월 21일
Try replacing
x = t.ModelName;
with
x = categorical(t.ModelName);
And run the code again.
If that doesn't work, attach the xlsx file using the paperclip button.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!