Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #13641
| From | Jon <devout1977@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | how to set initial values to symbolic variable array? |
| Date | 2013-02-28 04:43 +0000 |
| Message-ID | <kgmn9c$8hp$1@smc.vnet.net> (permalink) |
| Organization | Time-Warner Telecom |
Dear All,
Suppose I defined a symbolic variable array as
Array[a,4]
and defined a function as
f = a[1] + a[2] + a[3] + a[4]
I need to evaluate the value of f in the following way,
f/.{a[1]->1,a[2]->1, ...}
but specify each element of the array one by one is very troublesome, and I
wonder whether there is something like a group definition like
f/.{a[1:4]->1}
to define the four variables at the same time with the same value.
Thanks for your help,
Sincerely,
John
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
how to set initial values to symbolic variable array? Jon <devout1977@gmail.com> - 2013-02-28 04:43 +0000 Re: how to set initial values to symbolic variable array? Frank K <fkampas@gmail.com> - 2013-03-01 02:24 +0000 Re: how to set initial values to symbolic variable array? Szabolcs Horvát <szhorvat@gmail.com> - 2013-03-01 02:25 +0000 Re: how to set initial values to symbolic variable array? Ray Koopman <koopman@sfu.ca> - 2013-03-02 07:34 +0000
csiph-web