Subject: codengen[fortran] problem in Maple6
On Sun, 17 Dec 2000, Nonlinear Dynamics wrote:
> cjac:=
array(1..3, 1..3
,[(1,2)=
1600000*k0tau*exp(-8000*1/(430+200*theta))*(1-ksi)/((430+200*theta)^2)
,(3,2)= 1
,(2,3)= -kItau
,(3,3)= 0
,(1,3)= 0
,(1,1)= -1-k0tau*exp(-8000*1/(430+200*theta))
,(3,1)= 0
,(2,1)= -k0tau*exp(-8000*1/(430+200*theta))
,(2,2)=
-kp-1.5+1600000*k0tau*exp(-8000*1/(430+200*theta))*(1-ksi)/((430+200*theta)^2)
]);
>
> RETURN();
I am surprised that codegen[fortran] accepts it at all. I get an error
message about the array being declared with two indices but used with 1.
I suggest that you convert the array to "listlist" form:
cjac:=
array
([ #1st row
[-1-k0tau*exp(-8000*1/(430+200*theta))
,1600000*k0tau*exp(-8000*1/(430+200*theta))
*(1-ksi)/((430+200*theta)^2)
,0
]
, #2nd row
[-k0tau*exp(-8000*1/(430+200*theta))
,-kp-1.5+1600000*k0tau*exp(-8000*1/(430+200*theta))
*(1-ksi)/((430+200*theta)^2)
,-kItau
]
, #3rd row
[0, 1, 0]
]);
Look up the help on ?convert,listlist
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
From: Dr Pengfei Shi
To:
Subject: codengen[fortran] problem in Maple6
Date: Tue, 19 Dec 2000 13:32:14 -0500
You might want to eliminate the assignments in your square brackets and use
the usually way to assign the terms to cjac, or you can assign directly to
the entries of cjac.
Let me know.
|