Names on x-axis in the excel file
4 次查看(过去 30 天)
显示 更早的评论
Hi,
I am having trouble in plotting, I want to plot the graph where x-axis are names and y-axis numbers but I am getting the error below. what is solution for that.
Code:
close all; clear all; clc;
file = ["C:\Users\Alphagamma\alphagamma.xlsx];
for i = 1:numel(file)
a=readtable(file(i));
names = a{:,3}
values = a{:,5}
end
figure()
plot (names,values)
Error:
>> figure()
plot (names,values)
Error using plot
Invalid data argument.
采纳的回答
更多回答(0 个)
另请参阅
类别
Find more on Line Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!