help-octave
[Top][All Lists]
Advanced

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

Re: How to plot a function (graph)?


From: Søren Hauberg
Subject: Re: How to plot a function (graph)?
Date: Fri, 05 May 2006 17:13:29 +0200

Hi,
If you install octave-forge you'll get fplot. I'm guessing you can
install octave-forge the same way you installed octave. If you need the
source code for octave-forge, you can get it at http://octave.sf.net

Søren

fre, 05 05 2006 kl. 16:59 +0200, skrev Robb Bean:
> Hi!
> 
> Yesterday I started programming in Octave using a Matlab tutorial which 
> was very helfull, I did not expect Octave to be so close to the 
> "original". But I missed a function for plotting a function graph; 
> Matlab contains the fplot function, which does not exist in Octave. 
> Here is what I had to code:
> 
> __gnuplot_plot__(['[x=0:1] ', num2str(a), '*x*(1-x)'])
> 
> The Matlab way of doing this should be something like this:
> 
> % a is a global variable
> 
> function ret = f(x)
>      ret = a*x*(1-x)
> endfunction
> 
> fplot(@f, [0 1])
> 
> (See 
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/fplot.html 
> for details.) Did I miss something or is there really no fplot 
> equivalent in Octave?
> 
> Yours,



reply via email to

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