Writing to an External file, ie .txt
- To: mathgroup at smc.vnet.net
- Subject: [mg90525] Writing to an External file, ie .txt
- From: "Dave" <david.fourie at ncl.ac.uk>
- Date: Fri, 11 Jul 2008 02:07:22 -0400 (EDT)
- Organization: Newcastle University
I have a matica simulation that generates a Table. Currently it prints in at the bottom of the notebook and then I copy and paste it into a text file. below is the code that generates the Table. ************************************************** PD2mnax0[PD2u_] := 1/(1 + Exp[-(PD2u + 24.7)/5.29]); PD2hnax0[PD2u_] := 1/(1 + Exp[(PD2u + 48.9)/5.18]); PD2mk10x[PD2u_] := 1/(1 + Exp[-(PD2u + 14.2)/11.8]); PD2taumnax[PD2u_] := 1.32 - 1.26/(1 + Exp[-(PD2u + 120)/25]); PD2tauhnax[ PD2u_] := (0.67/(1 + Exp[-(PD2u + 62.9)/10]))*(1.5 + 1/(1 + Exp[(PD2u + 34.9)/3.6])); PD2taumk1[PD2u_] := 7.2 - 6.4/(1 + Exp[-(PD2u + 28.3)/19.2]); solution = NDSolve[{ PD2mnax'[ t] == (PD2mnax0[PD2z[t]] - PD2mnax[t])*(1/PD2taumnax[PD2z[t]]), PD2mnax[0] == PD2mnax0[-80]*(1/PD2taumnax[-80]), PD2hnax'[ t] == (PD2hnax0[PD2z[t]] - PD2hnax[t])*(1/PD2tauhnax[PD2z[t]]), PD2hnax[0] == PD2hnax0[-80]*(1/PD2tauhnax[-80]), PD2mkx'[t] == (PD2mk10x[PD2z[t]] - PD2mkx[t])*(1/PD2taumk1[PD2z[t]]), PD2mkx[0] == PD2mk10x[-80]*(1/PD2taumk1[-80]), PD2z'[t] == (-1*(0 + 1*1100*(PD2mnax[t]^3)*PD2hnax[t]*(PD2z[t] - 50) + 1*150*(PD2mkx[t]^4)*(PD2z[t] + 80) + 1*0.00081*(PD2z[t] + 50) ) *(1/6)), PD2z[0] == -80 }, {PD2z, PD2mnax, PD2hnax, PD2mkx}, {t, 0, time}, Method -> Automatic, MaxSteps -> Infinity]; mkw = Table[0, {time - 1}]; For[w = 1, w < (time), mkw[[w]] = PD2z[w] /. solution; w++]; mkw ******************************************************