[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Cannot plot in gnuplot what works in Octave

**From**: |
Henry F. Mollet |

**Subject**: |
Cannot plot in gnuplot what works in Octave |

**Date**: |
Tue, 23 Aug 2005 17:07:06 -0700 |

**User-agent**: |
Microsoft-Entourage/11.1.0.040913 |

I'm trying to plot f(x) = (1-h/((x-th)^2+1)) directly in gnuplot but get a
warning that "non-integer passed to boolean operator".
It works in Octave.
Henry
octave:1> x=0:35;
octave:2> y = (1-0.1./((x-9).^2+1));
octave:3> plot (x,y)
octave:4> quit
gnuplot> f(x) = (1-h/((x-th)^2+1)) % this must be element by element
operation in gnuplot, as I cannot enter the ./ and .^ operators in gnuplot
gnuplot> h= 0.1
gnuplot> th = 9
gnuplot> plot f(x)
non-integer passed to boolean operator
gnuplot> plot [x=0:35] f(x)
non-integer passed to boolean operator
% Below works just fine:
gnuplot> f(x) = Loo*(1-exp(-k*(x-to)))
gnuplot> Loo=500
gnuplot> k = 0.05
gnuplot> to = -5
gnuplot> plot f(x)
gnuplot> plot [x=0:35] f(x)
% Trying graw in Octave does not work either:
octave:1> x=0:35;
octave:2> y = (1-0.1./((x-9).^2+1));
octave:3> plot (x,y)
octave:4> graw "f(x) = (1-0.1./((x-9).^2+1))\n"
octave:5>
gnuplot> f(x) = (1-0.1./((x-9).^2+1))
^
line 0: ')' expected
octave:5> graw "f(x) = (1-0.1/((x-9)^2+1))\n"
octave:6> graw "plot f(x)\n"
octave:7> line 0: non-integer passed to boolean operator
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------

**Cannot plot in gnuplot what works in Octave**,
*Henry F. Mollet* **<=**