Weird .csv file plot problem
显示 更早的评论
Hey, When I plot from a csv file like so:
K=csvread(b);
plot(K);
I get the correct outcome but the x axis is not the first column as I would like it to be. So I tried this and it didn't work for some reason:
M=csvread(a);
x=M(:,1);
y=M(:,2);
l=M(:,3);
figure (1)
plot(x,y,'g');
hold on
plot(x,l,'r');
I do get a graph with the correct x axis, but the graph is missing many points unlike the previous way where it had all 700000 points. Do I have too many columns for the second way to work? I am using MATLAB 2013b. Thanks
2 个评论
Image Analyst
2018-7-21
You forgot to attach the files you're using for the badly-named a and b. Please attach them so we can try it and see what the difference is.
Haris Kioleidis
2018-7-21
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 2-D and 3-D Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!