Re: how to set initial values to symbolic variable array?
- To: mathgroup at smc.vnet.net
- Subject: [mg129968] Re: how to set initial values to symbolic variable array?
- From: Frank K <fkampas at gmail.com>
- Date: Thu, 28 Feb 2013 21:26:22 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
- References: <kgmn9c$8hp$1@smc.vnet.net>
In[1]:= ar = Array[a,4] Out[1]= {a[1],a[2],a[3],a[4]} In[2]:= f = Plus @@ ar Out[2]= a[1]+a[2]+a[3]+a[4] In[3]:= f/. Thread[ar -> 1] Out[3]= 4