help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Error: Numbers of rows must match (1 != 2)


From: Reza Housseini
Subject: Re: Error: Numbers of rows must match (1 != 2)
Date: Mon, 19 Mar 2012 16:37:48 +0100



On Mon, Mar 19, 2012 at 1:32 PM, Daniel Rossell <address@hidden> wrote:
I keep getting an error when I try to do a simple XY plot, here is the complete output :
 
octave-3.2.4.exe:4> x1 = csvread("c:\\data\\temporalHour_dataX.dat");
octave-3.2.4.exe:5> y1 = csvread("c:\\data\\temporalHour_dataY.dat");
octave-3.2.4.exe:7> length(x1)
ans =  5250
octave-3.2.4.exe:8> length(y1)
ans =  5250
octave-3.2.4.exe:9> plot(x1,y1,'+');
error: number of rows must match (1 != 2) near line 519, column 33
error: called from:
error:   C:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\plot\__go_draw_axes__.m
at line 519, column 24
error:   C:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\plot\__go_draw_figure__.
m at line 92, column 3
error:   C:\Octave\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\plot\gnuplot_drawnow.m a
t line 99, column 5
octave-3.2.4.exe:10>
 
The data reads in from the csv with no problem, and both x1 and y1 are the same length, so why do I get this error?

_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave


Probably a dimension mismatch. Try to plot like this:
plot(x1,y1','+');
The "'" operator transposes your vector.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]