help-octave
[Top][All Lists]
Advanced

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

Re: gplot doesn't work


From: Ben Abbott
Subject: Re: gplot doesn't work
Date: Thu, 25 Nov 2010 12:00:11 -0500

On Nov 25, 2010, at 11:23 AM, camox wrote:

> 
> Hi "octavers"
> I'm new in octave and I don't know how to sort a basic error out.
> If I just copy the second example about gplot in octave guide, this will be
> the output
> 
> octave:1> x = (-10:0.1:10)';
> octave:2> data = [x, sin(x), cos(x)];
> octave:3> gplot [-11:11] [-1.1:1.1] data with lines
> error: Invalid call to gplot.  Correct usage is:
> 
> -- Function File:  gplot (A, XY)
> -- Function File:  gplot (A, XY, LINE_STYLE)
> -- Function File: [X, Y] = gplot (A, XY)
> 
> I can't understand why the example isn't working on my pc.
> Did I miss to install any package? Are there compatibility problems with
> gnuplot?
> 
> Thank you in advance!!!


I don't know where you got that example. Perhaps it is form an old version of 
Octave?

In the last few years Octave has had many changes. Its language is not 
consistent with Matlab.

What version of Octave are you running?

I'm unfamiliar with the gplot command, but the current manual includes the 
example below.

        A = sparse ([2,6,1,3,2,4,3,5,4,6,1,5], [1,1,2,2,3,3,4,4,5,5,6,6],1,6,6);
        xy = [0,4,8,6,4,2;5,0,5,7,5,7]’;
        gplot(A,xy)

Ben




reply via email to

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