Re: ReplacePart
- To: mathgroup at smc.vnet.net
- Subject: [mg131642] Re: ReplacePart
- From: Bill Rowe <readnews at sbcglobal.net>
- Date: Sun, 15 Sep 2013 07:07:06 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
On 9/14/13 at 6:02 AM, man21 at free.fr (man21) wrote: >As a result of a calculation, I end up with a list of numerical >values which contains some "Indeterminate". >x ={-1.25664, 0.628319, -0.628319, 1.25664, Indeterminate, -1.25664, >0.628319, -0.628319, 1.25664, Indeterminate} >I try to replace the "Indeterminate" by "0", using : >ReplacePart[x, {5, 10} -> 0.] >but this dosen't work. Any idea why, and how to do it ? It didn't work since x is a 1D array and there is no position {5,10} which is a coordinate in a 2D array. I assume what you wanted to do is ReplacePart[x, {{5}, {10}} -> 0.]