cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Regular Member

## Help with programming

Hey I have a question. Since I am still quite new to this software, if you think my question is easy, please help me out. Suppose I have a value calculated at the end with different parameters. Wondering if there is any way that for each parameter, I can create a matrix or excel with two columns, one is the parameter number, and the other is the corresponding value, when keeping others constant.

Thanks a lot!

8 REPLIES 8

## Re: Help with programming

Hi,

It is easy to do what you are after, but first -> which version are you using?

Cheers

## Re: Help with programming

I am using mathcad prime 2. Thanks!

## Re: Help with programming

here we go.

Raiko

P.S.

Regular Member
(in response to Raiko)

## Re: Help with programming

The problem I have is that the outcome variable is not a simple equation and it's been calculated after 5 or 6 pages with many other parameters too (even though we can keep other parameters constant). Wondering how you solve the problem in this case?

Thanks again!

## Re: Help with programming

Its stabbing in the dark without seeing what you do, but I guess you would have to turn every calculation, which uses the parameters you would like to vary at the end, into functions dependent on those parameters.

With long winded calculations as you describe it this can be pretty cumbersome and result in a wild looking worksheet.

It has bee a long standing wish of the community to be able to turn a whole worksheet into a function of a number of selectable arguments but as development is running now, that kind of wishes never will be fulfilled.

While I don't like the approach - Raikos way to start with vectors of input values right from the start, vectorize the calculations to end up with a vector of result values should work with long winded calculations as well (and possibly will look cleaner compared to the suggested functional approach). Where do you see a problem with that?
Guess it would help if you post a worksheet to show what exactly you are trying to attempt (a simplified one showing only the important things would be preferred).

BTW, as you obviously could read Raikos MC15 worksheet, you seem to have MC15 installed along with Prime 2. Why do you bother to use Prime 2 when MC15 is at your hand?

Regular Member
(in response to Werner_E)

## Re: Help with programming

I am not quite sure if I want to continue in this way rather than simply manually get the results. One reason for me to hesitate is that for those long winded calculations, there are already matrices. I am afraid the vectorization of parameters would make the worksheet look too crazy.

I will try to upload a worksheet I am working soon.

Thanks a lot again!

## Re: Help with programming

that for those long winded calculations, there are already matrices. I am afraid the vectorization of parameters would make the worksheet look too crazy.

Even worse! If your calcs already use matrices, then the approach with the vectors of input values and vectorization might not work at all, because vectorization is applied to ALL matrices in the vectorized expression.

Regular Member
(in response to Werner_E)

## Re: Help with programming

Thank you very much!

Announcements
Check out the latest