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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Results of Parametric study in a matrix form

SFares
12-Amethyst

Results of Parametric study in a matrix form

Hello All,

 

In the attached mathcad15, i'd like to automate the output "Z.summary"  for each steel thickness "ts" instead of doing each individually.

On page 6, i had to create Z summary for each steel thickness ts=0.142, 0.150, .... How can i have it show for each steel thickness the corresponding Z.summary without having to individually putin the row number 0,1,..? i showed the results for Zsummary for t=0.142 and 0.150.

 

Thank you,

Sam

1 ACCEPTED SOLUTION

Accepted Solutions
Werner_E
24-Ruby V
(To:SFares)

Would this be of help?

Werner_E_0-1608655234588.png

 

View solution in original post

4 REPLIES 4
Werner_E
24-Ruby V
(To:SFares)

I stopped at the first error encountered and I guess the other errors are of similar nature.

The problem is that a comparisaon like <= needs scalars on both sides and unfortunately we cannot vectorize <= etc directly. But we can create an auxiliary function and then we can call that function vectorized with your input values:

Werner_E_0-1608578877939.png

Generally its a good idea to turn the calculations into functions which work for scalars at input value and only then call those functions vectorized with your vector input values.

I picked your attempt to calculate Penetration_Reduction_factor and noticed, that you did not consider all possible cases:

Werner_E_0-1608579089861.png

You should always consider all cases, even though you may think that a specific case can't happen. You may use "if" and "otherwise" or use "return" on every if statement and put the output value for all other cases in the last line of the program.

As an example:

Werner_E_1-1608579239824.png

 

SFares
12-Amethyst
(To:Werner_E)

Thank you so much Werner!

I fixed what you suggested and attached the file. If you look on page 6, to get the final results for each thickness, i have to individually go and change the row number to extract the data for each thickness. For example ts=0.158, i use row 2, ts=0.188, row 3 and so on. If i have 30 thicknesses, how can i automate the row number ? All results data can all be in one table with the corresponding column and row headings.

 

Thanks

Sam

Werner_E
24-Ruby V
(To:SFares)

Would this be of help?

Werner_E_0-1608655234588.png

 

SFares
12-Amethyst
(To:Werner_E)

Great. Thanks a lot Werner!

 

Sam

Top Tags