Error using plot Invalid data argument.
10 次查看(过去 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!