Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: how to set initial values to symbolic variable array?
Replies: 3   Last Post: Mar 2, 2013 2:34 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Frank K

Posts: 40
Registered: 7/11/10
Re: how to set initial values to symbolic variable array?
Posted: Feb 28, 2013 9:24 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.