cencen_cj

15 Reputation

2 Badges

5 years, 124 days

MaplePrimes Activity


These are questions asked by cencen_cj

Hi, I have a procedure named f1. In it, it calls another procedure f couple of times. procedure f does not have recursive calls implemented.

I have no idea what caused the error. Could anyone give a hint?

Thanks a million in advance,

Best,

Jie

Hi, my codes ran smoothly well until I changed some assignment value. It reported invalid object error.

Error, Got internal error in Typesetting:-Parse:-Postprocess : "internal error: invalid object "

Part of the codes are as follows:

""sigma:=0.00002:    m:=5:   n:=4:
Error, Got internal error in Typesetting:-Parse:-Postprocess : "internal error: invalid object "

Could anyone give some hints on what goes wrong here? It seems to be a configuration issue but I completely have no clue..

Thanks a million in advance,

Best,

Jie

 

 

f1:=proc(n) local x,y,i,rx ,ry,dumbindex:  

dumbindex:=1:  

xdumb[1]:=n:  

ydumb[1]:=n:  

for i from 1 to  n do    

d:=0.00197241:  flag:=1:  

while(d>0.0019724 or flag=1) do    

rx:=rand(1..n):  x[i]:=rx():  ry:=rand(x[i]..n):  y[i]:=ry():  flag:=check(x[i],y[i],xdumb,ydumb,dumbindex):  

if flag=1 then  dumbindex:=dumbindex+1  xdumb[dumbindex]:=x[i]:  ydumb[dumbindex]:=y[i]:  fi:  

p,d:=f(x[i],y[i]):  

end :  

xl[i]:=x[i]:yl[i]:=y[i]:  

if  i=1 then   temp:=p:xg:=x[i]:yg:=y[i];  

else  

if p<temp then   temp:=p:xg:=x[i]:yg:=y[i] ;  fi:  

fi:

end do:  

return xg,yg:  

end proc;

 

That's the definition of my procedure. It reported illegal use of an object as a name error. Could anyone help have a look and point out what goes wrong. I just started using Maple. Thanks a million in advance.

Page 1 of 1