Question
- To: mathgroup at smc.vnet.net
- Subject: [mg22576] Question
- From: aranisin at usc.edu (aranisin)
- Date: Sat, 11 Mar 2000 17:52:47 -0500 (EST)
- Organization: University of Southern California, Los Angeles, CA
- Sender: owner-wri-mathgroup at wolfram.com
Hello, In the following code, the program takes more runtime and memory resources than that allowed by my system. The suspected code is underlined. Is there a better way of writing this code? Please e-mail me responses at this e-mail address. Thank you very much. Arani Sinha ScientificForm[%]; R11=2; R22=2; L11=10^-9; L22=10^-9; L12=5 10^-10; C11=25 10^-15; C22=25 10^-15; C12=15 10^-15; Rs1=50; Rs2=50; Cs1=10^-14; Cs2=10^-14; a=4.24 10^10; D1={{0,0,-R11,0}, {0,0,0,-R22}, {0,0,0,0}, {0,0,0,0}}; E1={{0,0,-L11,-L12}, {0,0,-L12,-L22}, {-C11,C12,0,0}, {C12,-C22,0,0}}; X=D1+s E1; Y=MatrixExp[X]; A={{1/Rs1,0,0,0,1,0,0,0}, {0,1/Rs2,0,0,0,1,0,0}, {0,0,s Cs1,0,0,0,-1,0}, {0,0,0,s Cs2,0,0,0,-1}, {Y[[1,1]],Y[[1,2]],-1,0,Y[[1,3]],Y[[1,4]],0,0}, {Y[[2,1]],Y[[2,2]],0,-1,Y[[2,3]],Y[[2,4]],0,0}, {Y[[3,1]],Y[[3,2]],0,0,Y[[3,3]],Y[[3,4]],-1,0}, {Y[[4,1]],Y[[4,2]],0,0,Y[[4,3]],Y[[4,4]],0,-1}}; Vs=1/(s+a); V={{Vs/Rs1},{0},{0},{0},{0},{0},{0},{0}}; M[i_]:=M[i]=D[M[i-1],s]; M[0]=A; Z[i_]:=Z[i]=(Limit[M[i],s->0,Direction->1])/(Factorial[i]); P[k_]:=P[k]=-Inverse[Z[0]].(Sum[Z[r].P[(k-r)],{r,1,k}]); -------------------------------------------------------- P[0]=Inverse[Z[0]].V; --------------------- Q=P[0]+s P[1]+s^2 P[2]+s^3 P[3]+s^4 P[4]+s^5 P[5]; -------------------------------------------------
- Follow-Ups:
- Re: Question
- From: Hartmut Wolf <hwolf@debis.com>
- Re: Question