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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.