Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9367

ReplacePart, Multiple replacements in one time

From Andrey Demidov <andrey.demidov@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject ReplacePart, Multiple replacements in one time
Date 2012-04-02 08:30 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jlbo41$47q$1@smc.vnet.net> (permalink)

Show all headers | View raw


I'm just wondering if it is possible to make n different replacements in one command?

Something like this:

>> a = {{1, 2}, {3, 4}}
>> ReplacePart[a, 1 -> a[[1]] * 2, 2 -> a[[2]] + 5]

Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

ReplacePart, Multiple replacements in one time Andrey Demidov <andrey.demidov@gmail.com> - 2012-04-02 08:30 +0000
  Re: ReplacePart, Multiple replacements in one time nanobio9 <kuokan.liang@gmail.com> - 2012-04-03 08:49 +0000
  Re: ReplacePart, Multiple replacements in one time Rodrigo Murta <murta@rodrigomurta.com> - 2012-04-03 08:54 +0000

csiph-web