s1mpsonn

5 Reputation

2 Badges

3 years, 296 days

MaplePrimes Activity


These are questions asked by s1mpsonn

This is my code

 

am:=proc(dx,Nminus,Nplus)
global k_r,n,tau,a2,m;
k_r:=1/2;
a2:=a/2;
k=0;
u:=[]:
for n from Nminus to Nplus do
k:=k+1:
u(k):=max(exp((0.5*(k_r+1)^2)*0)*(exp(0.5*n*dx*(k_r+1))-exp(0.5*n*dx*(k_r-1))),0);
u:=[op(u),u(k)];
end do;
end proc;

 

I keep getting the error.

Error, (in am) invalid left hand side in assignment.

 

I would like to fill the array u with [u(1),u(2),...,u(Nplus-Nminus)]

 

Please help!

Page 1 of 1