"Wrong usage" error message when trying to plot with plot3d or contour_plot
Subject: "Wrong usage" error message when trying to plot with plot3d or contour_plot
From: Robert Dodier
Date: Fri, 27 May 2011 14:33:24 -0600
George, the problem is that plot3d is attempting to detect a case
in which the expression never evaluates to a number, which would otherwise
result in an empty plot. But the logic to detect such cases is faulty;
there are expressions which fail the test, but yield numbers all the same.
You have found such an expression.
You can disable the error by searching for the error message
in your copy of plot.lisp (somewhere in your Maxima installation)
and changing merror to mtell. Then load("FOO/plot.lisp"); where FOO =
the appropriate path,
will load your modified copy.
I will probably make the same change in the project source code;
I'm pretty sure others have run into the same problem.
best,
Robert Dodier
On 5/26/11, George <pinkisntwell at gmail.com> wrote:
> Here is a short script that will reproduce the error:
>
> fn(x):=1/sqrt(2*%pi)*exp((-x^2)/2);
> Fn(x):=integrate(fn(t),t,-inf,x);
> pw(r1,r2,s1,s2):=1-Fn((r2-r1)/sqrt(s1^2+s2^2));
> fbn(x,y,r):=1/(2*%pi*sqrt(1-r^2))*exp((-(x^2-2*r*x*y+y^2))/(2*(1-r^2)));
> fbnxcy(x,y,r) := fbn(x,y,r) / fn(y);
> loww(rs2, ro, r, s1, s2) := quad_qagi(fbnxcy(rs1, rs2, r)*pw(rs1, ro,
> s1, s2), rs1, minf, inf);
>
> plot3d( loww(rs2, 0, r, 1, 1)[1] , [rs2, -1.5, 2.5], [r, 0.1, 0.9] );
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>