Subject: [Newbie] Plot problem (Feature suggestion)
From: Andrei Zorine
Date: Mon, 24 Jan 2005 11:35:31 +0300
Hello,
I'm not answering this question, but wondering if there's a need for a
special switch to turn on/off compilation of functions in quad_qagi-like
functions? When plot2d calls quad_qagi many many times it's slower to
compile-function each time than to use it 'as is'. At the beginning of
$quad_qagi there's (let* (... (f (compile nil (coerse-float-fun ...));
erasing this (compile ...) stuff speeds up plotting time. Maybe put a
conditional there?
--
Andrei Zorine
Tim Day wrote:
> If I execute the following:
>
> NUMER:TRUE;
> REALONLY:TRUE;
> f(x,y):=1/(x^4+y^4);
> F(x):=quad_qagi(f(x,y),y,0,both)[1];
>
> Then querying F(1); F(2); etc outputs sensible numbers.
> However, trying to get a graph of F:
>
> plot2d(F(x),[x,-2,2]);
>
> fails with
>
> Error in FUNCALL [or a callee]: ((MEXPT SIMP)
> ((MPLUS SIMP) 1.0
> ((MEXPT SIMP) |$x| 4))
> -1) is not of type (OR RATIONAL
> LISP:FLOAT).
>
> I have a vague idea the solution involves dropping a "'" in the right
> place, or inserting some MODE_DECLAREs or using FLOATDEFUNK. However,
> I've completely failed to get anywhere with either of them. What's the
> trick ?
>
> [I'm using maxima 5.9.1 on Debian Sarge. Things like:
> plot2d(sin(x),[x,-%pi,%pi]);
> work fine, coming up in gnuplot.]
>
> Thanks for any help
> Tim
>
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>