sequencial function programming
- To: mathgroup@smc.vnet.net
- Subject: [mg11753] sequencial function programming
- From: Students <students@micsrv1.mic.dtu.dk>
- Date: Thu, 26 Mar 1998 03:09:22 -0500
- Organization: News Server at UNI-C, Danish Computing Centre for Research and Education.
Hey I'm trying to make a function that takes its sollution from a list of piecewice definied differential equations. The last equation take its inertial conditions from the second last equation and so forth. One way to do this is to define the conditions in the following manner x[s_(n-1)]==x[s_(n-1)] /. system[n-1][a1,a2] and then finally calling the function by Function_x[N_][a1,a2]:=x[s_N] /. system[N][a1,a2] where system[n-1] defines the previous systems of differential equations and s_n is the inteface point between the n'th and the (n+1)'th systems. a1 and a2 are values used in solving the equations. Doing this with 10 systems of 5 equations it take a very long time to calculate each instance of the function. Then the question is how do I force Mathematica to calculate the first equation before trying to calculate the next. Thanks Torben Please reply using e-mail: c958038@student.dtu.dk