Re: Compile ReplacePart
- To: mathgroup at smc.vnet.net
- Subject: [mg52559] Re: [mg52545] Compile ReplacePart
- From: Jörg Schaber <schaber at molgen.mpg.de>
- Date: Thu, 2 Dec 2004 02:21:09 -0500 (EST)
- References: <20041201115419.5F60D33E62@smtp2.bgu.ac.il>
- Sender: owner-wri-mathgroup at wolfram.com
Well, I am afraid that the specific code line will not really help you, but here it is: Compile[ ..... p = CheckXBounds[x, lb, ub]; x = ReplacePart[x, new, p, p]; .... ]; where p is of the same form as is returned by the function Position. The code works perfectly well, when is is not part of a Compiled Function. Best joerg yehuda ben-shimol wrote: >It is difficult to comment to your posting without an exact reference to the >line (or block of code) that caused the problem. Can you send it so we will >be able to figure out what is wrong? >yehuda > >-----Original Message----- >From: Joerg Schaber [mailto:schaber at molgen.mpg.de] To: mathgroup at smc.vnet.net >Sent: Wednesday, December 01, 2004 12:59 PM >To: mathgroup at smc.vnet.net >Subject: [mg52559] [mg52545] Compile ReplacePart > >Hi, > >using ReplacePart with 4 arguments in a Compiled Function gives me the >error 'ReplacePart::argrx: ReplacePart called with 4 arguments; 3 >arguments are expected', even though ReplacePart is defined also for 4 >arguments in regular Mathematica code. >What's the problem here? > >best, > >joerg > > > > -- ---------------------------------------------- Jörg Schaber Max Planck Institute for Molecular Genetics Ihnestrasse 63-73, 14196 Berlin, Germany Phone: +49 30 804093 19, Fax: +49 30 804093 22 ----------------------------------------------