Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am constructing 3D data points for a plot and corresponding to specific conditions "manually". I define the values of five parameters [these I always have to define myself]. From those, I evaluate the values of seven other parameters [some of which are also functions of each others, so I need to be careful with order of evaluation].

Currenly this is how I do it [parameters are functions of values and other parameters]:

par1cond1 = par1[val1, val2, val3];
par2cond1 = par2[val1, val2, par1cond1, val4];
par7cond1 = par7[val1, par6cond1];  

And I assign these as the parameters of a vector.

vector1[t_] := {vx[par1cond1, ..., t], vy[par1cond1, ...,t], vz[par1cond1, ..., t]};

In short --- how do I define a function that only takes as its variables the five original parameters, and evaluates the seven relevant expressions in a certain order, and returns the values it got?

I would like to do it by calling one function, that would do the manual labour for me:

ConstructVectorFrom[val1, val2, val3, val4, val5]

Which would return the vector.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.