how to plot data from a csv in matlab -


i have csv file following data structure:

p1_1,p2_1,p3_1 p1_2,p2_2,p3_2 p1_3,p2_3,p3_3 

and want plot p2 againt p3 in matlab, wrote code:

function plotdata dbstop if error filename='c:\\temp\\out100-2.csv';  m=csvread(filename);  plot(m(2),m(3)); 

but plot empty. checked , m has data, way using plot not right.

how can fix problem can plot it?

m(2) , m(3) 2 scalar values, hence plot single point.

you need supply vectors plot, e.g.:

plot(m(:,1),m(:,2)) 

this plots data first , second columns of csv file.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -