saving initialization cells as a .m file
- To: mathgroup at smc.vnet.net
- Subject: [mg99814] saving initialization cells as a .m file
- From: Baris Altunkaynak <fractaldimension at yahoo.com>
- Date: Fri, 15 May 2009 04:19:06 -0400 (EDT)
Hi, I have the following code which runs fine in a notebook: SuperDagger[A_List] := Conjugate[Transpose[A]] eqn = {f'[t] == -f[t]^\[Dagger].f[t], f[0] == RandomReal[{0, 0.1}, {3, 3}]}; NDSolve[eqn, f, {t, 0, 10}] but when I save the first two lines (definition of SuperDagger and eqn) in a .m file and load them with a Get command, although Mathematica loads the definitions, NDSolve doesn't like the input and complains that derivative at t=0 is not defined. Weirdly if I copy and paste the output of NDSolve and evaluate it, it runs fine. Do you know how can I fix this? best regards, Baris Altunkaynak