Weird .csv file plot problem
Ältere Kommentare anzeigen
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 Kommentare
Image Analyst
am 21 Jul. 2018
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
am 21 Jul. 2018
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!