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: indium
Subject: Re: Error: Numbers of rows must match (1 != 2)
Date: Mon, 19 Mar 2012 15:00:37 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

On Mon, Mar 19, 2012 at 08:32:54AM -0400, Daniel Rossell 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?

Hi Daniel,

maybe you should also check with

whos x1 y1
size(x1) size(y1)

what is the total size of x1 and y1. Maybe it chokes on x1 having more or less 
columns than y1?

maybe you should plot x1(:,1) and y1(:,1) instead of x1,y1?




reply via email to

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