Set in Scan
- To: mathgroup at smc.vnet.net
- Subject: [mg21856] Set in Scan
- From: "Johannes Ludsteck" <ludsteck at zew.de>
- Date: Wed, 2 Feb 2000 22:54:15 -0500 (EST)
- Organization: Zentr. f. Europ. Wirtschaftsforsch
- Sender: owner-wri-mathgroup at wolfram.com
Dear MathGroup members I have to do replacements in very long lists. An efficient way to do this is to use x[[index]]=newElement. This, however, doesn't work if I want to do replacements for a set of lists. If I try to replace the third element in the lists v1, v2 and v3 by typing Scan[#[[3]] = newElement &, {v1,v2,v3}] I get the error message Set::setps: #1 in assignment of part is not a symbol. Any suggestions? Thanks Johannes Ludsteck Centre for European Economic Research (ZEW) Department of Labour Economics, Human Resources and Social Policy Phone (+49)(0)621/1235-157 Fax (+49)(0)621/1235-225 P.O.Box 103443 D-68034 Mannheim GERMANY Email: ludsteck at zew.de
- Follow-Ups:
- Re: Set in Scan
- From: Hartmut Wolf <hwolf@debis.com>
- Re: Set in Scan