Re: Re: Re: saving initialization cells as a .m file
- To: mathgroup at smc.vnet.net
- Subject: [mg99990] Re: [mg99962] Re: [mg99892] Re: saving initialization cells as a .m file
- From: John Fultz <jfultz at wolfram.com>
- Date: Thu, 21 May 2009 00:06:36 -0400 (EDT)
- Reply-to: jfultz at wolfram.com
Bugs are sent to to the tech support team. FWIW, though, it's already been fixed in the internal development version of Mathematica, along with a few otherrelated issues such as the handling of Super/Sub Plus and Minus. For now, you'll have to remember to explicitly use the FullForm version of, e.g., SuperDagger[x]. Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc. On Wed, 20 May 2009 04:59:56 -0400 (EDT), fractaldimension at yahoo.com wrote: > > > Hi Daniel thank you for your response but unfortunately this didn't work > for me. b^\[Dagger] // FullForm returns Power[b,\[Dagger]]. I guess since > Power is Listable trying to define something like > Power[b_List,\[Dagger]]:=Conjugate[Transpose[b]] doesn't work either. > > I think Sjoerd is right and this is probably a bug. I am not exactly sure > how to report a bug though. I remember that I've sent an email to > bugs at wolfram.com (or bug at wolfram.com) in the past for another bug but > nobody replied to me so I am not sure if that's the procedure. > > best regards, > Baris > > > --- On Mon, 5/18/09, dh <dh at metrohm.com> wrote: > >> From: dh <dh at metrohm.com> >> Subject: [mg99892] Re: saving initialization cells as a .m file >> To: mathgroup at smc.vnet.net >> Date: Monday, May 18, 2009, 6:18 AM >> >> >> Hi Baris, >> >> if you want b^\[Dagger] to mean SuperDagger[b] internall, >> you may define >> >> this e.g. by: >> >> >> Clear[SuperDagger, A]; >> >> SuperDagger[A_List] := Conjugate[Transpose[A]]; >> >> Format[A_^\[Dagger], SuperDagger[A_]]; >> >> SuperDagger /; A_^\[Dagger] := SuperDagger[A]; >> >> >> The Format line ensures that Dagger is printed instead of >> SuperDagger. >> >> The next line transforms an input of SuperDagger to Dagger. >> You may >> >> check the working by: >> >> >> b =.; >> >> SuperDagger[b] >> >> b^\[Dagger] // FullForm >> >> >> Daniel >> >> >> Baris Altunkaynak wrote: >> >>> Hi thank you for your response, I actually copied this >> from a working notebook. I used Ctrl+^ Esc dg Esc to get the >> dagger symbol and when I copy and paste it in the email it >> becomes this. Also in the .m file it looks the sam e way. So >> I guess that's why it doesn't work. Is there anyway to >> do this without typing the full function name? I want to >> keep the notation because I have really really long >> equations to enter which I would like to finally convert to >> a .m file and the notation is the most important thing for >> me. best regards, Baris >>> >>> >>> --- On Fri, 5/15/09, dh <dh at metrohm.com> >> wrote: > >> >>> From: dh <dh at metrohm.com >>> >>> Subject: Re: saving initialization cells as a .m >> file >> >>> Date: Friday, May 15, 2009, 6:26 AM >>> >>> >>> Hi Baris, >>> >>> f[t]= ^\[Dagger] does not apply SuperDagger. >>> >>> You would have to say SuperDagger[f[t]] >>> >>> Daniel >>> >>> >>> Baris Altunkaynak wrote: >>> >>> 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