Question: Plotting function of more than one variable.

The plot function will not work with the following code:

> vatt:= (r,b,rc) -> -epsilon*(cos(Pi*(r-rc)/(2*wc)))^2;

> VattR := proc(r,b)
> rc:= evalf(b*2^(1/6));if r < rc then RETURN(-epsilon) elif rc <= r and r <= (rc+wc) then RETURN(vatt(r,b,rc)) else RETURN(0) end if;
> end proc;

> plot(VattR(r,1),r=1.1..1.2);
Error, (in VattR) cannot determine if this expression is true or false: r < 1.122462048
> VattR(1.1,1);
-1.0

The functions work fine on their own....
Please Wait...