RE: Re: Packed Arrays in version 4
- To: mathgroup at smc.vnet.net
- Subject: [mg19132] RE: [mg19082] Re: [mg18963] Packed Arrays in version 4
- From: "Ersek, Ted R" <ErsekTR at navair.navy.mil>
- Date: Thu, 5 Aug 1999 23:58:37 -0400
- Sender: owner-wri-mathgroup at wolfram.com
John Tanner has been trying to find a way to make it so that when a packed array is multiplied by a complex number a packed array is returned. He wants make sure old notebooks that are somewhat large will take full advantage of packed arrays without doing lots of manual editing. John wrote: --------------------------------------- It has been suggested to me by e-mail that using (N[I]*array) instead of (I*array) solves the problem, and indeed I had found that ((I+0.0)*array) also solved the problem. The real problem is that multiplying a real array by I is so common in electronics/microwaves! I have many, many notebooks with many,many,many occurrences of this and I do not want to start chasing them all down. Thus I have a real motivation for making this work as a redefinition of Times or \[ImaginaryI]. A global redefinition of Global`I := N[System`I] (see my reply to Bruno Daniel) is probably extremely risky! -------------------------------- I haven't worked out a solution, but you might be able to make a function that would automatically perform the necessary manipulation on an existing notebook to say change (I) to (I+0.0) in all the right places. How to perform a search and replace in a file is explained at: http://support.wolfram.com/Kernel/Files/Replace.html ------------- Regards, Ted Ersek