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

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

matrix and variable handling

ID_10962613
4-Participant

matrix and variable handling

I would like to go through the same worksheet several times, changing "index" and the various parameters, and put the calculation results in the same Rez matrix, in the corresponding "index" column. Unfortunately the previously defined columns are set to zero.

2 REPLIES 2
Werner_E
25-Diamond I
(To:ID_10962613)


@ID_10962613 wrote:

I would like to go through the same worksheet several times, changing "index" and the various parameters, and put the calculation results in the same Rez matrix, in the corresponding "index" column. Unfortunately the previously defined columns are set to zero.


Your worksheet does not show much of what you be trying to achieve.

Not sure what the input should be and  what you expect as a result.

Your function RR just returns the vector mx if the first function argument is 0, otherwise the return value is 0.

In case that the second function argument is not a vector, the function returns a 1x1 matrix containing it if opt=0.

Werner_E_0-1726861503781.png

 

I have no idea what you are trying to achieve, which worksheet and which calculations you would like to run several times and which 'index" (of what?) you want to change. And if you intend to use variables like "Option" and "Tab" you sure have to define them before you make use of them.

 

You will have to explain in more detail what you want to achieve. Provide examples and state what you expect as result.

 

StuartBruff
23-Emerald III
(To:ID_10962613)

Like Werner, I'm not sure what you're trying to achieve without some data and examples of expected output.

 

However, as a wild guess, is it something along these lines?

 

2024 09 20 E.png

 

2024 09 20 F.png

 

I haven't got the mighty M15, so I had to import your worksheet into Mathcad Prime 10.  It shouldn't be too hard to translate back into M15 (by hand!).

 

Stuart

Announcements

Top Tags