Question: dividing the function on its maximum

Dear all,

Trying to divide the function (f1) at its maximum and normalized it.. there is error on. the (proc)

could anyone help me on that PLEASE.

 

restart:
assume(Delta,real):assume(c,real):xr:=1:ao:=sqrt(1+c^2):theta:=arctan(c):a:=ao*exp(I*theta):b:=I*0.5*Delta-a*(k-1)*xr*0.5:no:=1:AA:=5:theta1:=0:Omega:=10:
f:=sqrt(Pi/ao)*exp(-I*0.5*theta)*sum(exp(b^2/a)*exp(-a*(k-1)^2*xr^2),k=1..1):alpha:=AA*exp(I*theta1):
f1:= AA^2+((Re(f))^2+(Im(f))^2)*Omega^2+2*Omega*Im(conjugate(alpha)*f):
P1:=plot3d((f1),Delta=-5..5,c=-5..5,axes=boxed,font=[1,1,18]):
Normalize:= proc(P::specfunc(anything, PLOT))
local A,Smax1;
A:= op([1,1], P);
Smax1:= max(A[..,2]);
if A::list then A:= Matrix(A) end if;
A[..,2]:= A[..,2]/Smax1;
subsop([1,1]= A, P)
end proc:
P1:= Normalize(P1):
display([P||(1..1)]);

 

Please Wait...