[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error while plotting
From: |
Matthias Brennwald |
Subject: |
Re: error while plotting |
Date: |
Fri, 11 Jul 2008 08:00:16 +0200 |
On Thu, 2008-07-10 at 23:55 -0500, address@hidden wrote:
> Message: 6
> Date: Fri, 11 Jul 2008 10:25:11 +0530
> From: "Srinivasa Ramanujam" <address@hidden>
> Subject: error while plotting
> To: address@hidden
> Message-ID:
> <address@hidden>
> Content-Type: text/plain; charset="utf-8"
>
> Dear Sir/Madam,
>
> I recently downloaded the latest version of Octave from internet. The
> installation was successful, and when I tried to execute a simple code
> to
> plot the variables a and b, I received the following error message.
>
> octave-3.0.1.exe:1> a={1,2,3};
> > octave-3.0.1.exe:2> b={1,4,9};
> > octave-3.0.1.exe:3> plot(a,b)
> > error: mapper: wrong type argument `cell'
> > error: evaluating argument list element number 1
> > error: evaluating argument list element number 1
> > error: if: error evaluating conditional expression
> > error: evaluating if command near line 42, column 3
> > error: called from `__plt2__' in file `C:\Program Files
> > (x86)\Octave\share\octav
> > e\3.0.1\m\plot\__plt2__.m'
> > error: evaluating assignment expression near line 76, column 10
> > error: evaluating if command near line 75, column 4
> > error: evaluating if command near line 55, column 2
> > error: evaluating if command near line 54, column 7
> > error: evaluating while command near line 41, column 5
> > error: evaluating if command near line 28, column 3
> > error: called from `__plt__' in file `C:\Program Files
> > (x86)\Octave\share\octave
> > \3.0.1\m\plot\__plt__.m'
> > error: evaluating assignment expression near line 187, column 9
> > error: called from `plot' in file `C:\Program Files
> > (x86)\Octave\share\octave\3.
> > 0.1\m\plot\plot.m'
> > octave-3.0.1.exe:3>
> > gnuplot> plot "-";
> > ^
> > line 1: Bad data on line 1
> >
> >
> > gnuplot> e
> > ^
> > line 1: invalid command
> >
>
> I've installed octave for windows version and am running Windows XP
> Professional edition (64 bit) on my computer. Can you please help me
> to fix
> this issue?
You defined your variables a and b as cell arrays. However, the plot
command takes vectors, not cell arrays (see the documentation for more
about this). Use
a = [1,2,3]
Instead of
a = {1,2,3}
(and the same for b).
Matthias
- error while plotting, Srinivasa Ramanujam, 2008/07/11
- Re: error while plotting,
Matthias Brennwald <=