Re: Multiple Constants
- To: mathgroup at smc.vnet.net
- Subject: [mg83262] Re: Multiple Constants
- From: Steven Siew <siewsk at bp.com>
- Date: Fri, 16 Nov 2007 05:32:40 -0500 (EST)
- References: <fhh80l$946$1@smc.vnet.net>
The following sequence of mathematica script will set the variables to
have the attribute Constant. First we show that the variables b and c
are just normal variables. Then we set their attributes to Constant.
And lastly we show that their attributes has changed.
Steven Siew
Attributes[b]
Attributes[c]
listofconstants = {b, c, d, A, f, g, h, Q}
Map[SetAttributes[#, Constant] &, listofconstants]
Attributes[b]
Attributes[c]
On Nov 15, 9:45 pm, thehammers... at gmail.com wrote:
> Hi,
> I'm new to Mathematica and I feel like this is a stupid question but I
> can't seem to define more than one constant
>
> If I type
> SetAttributes[a,b,c,Contstant]
> I get
> SetAttributes::argrx: SetAttributes called with 4 arguments; 2
> arguments are \expected.
>
> I have three equations and three variables I want to solve for and I
> have 8 constants.
>
> x+y+z=1
> b*x+c*y+d*z=A
> f*x+g*y+h*z=Q
>
> b,c,d,A,f,g,h,Q are constants and I want a generic equations that I
> can use for many different variations of these constants.
>
> I've done the calculation by hand but fear I have made a mistake and
> would like to double check my calculation, and then use the equation
> to propagate my errors, as each constant has an associated standard
> error of the mean. Propagation of my error will give me an error on my
> model calculation, which is really important.
>
> Thanks