Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with multiple nested IF statements...

Status
Not open for further replies.

Skyler G.

Mechanical
Joined
Nov 24, 2020
Messages
4
Location
US
Thank you all in advance...

The first file shows how the intended equations are to be used and the interpolations needed to derive the values. However, I am trying to create the same information with the ability to pull the information directly from the table (matrix) with the ability to interpolate in both the x and y values, as needed.

What i have up to this point is shown in the second file. I am slowly finding a way to make it work, however I would really appreciate any assistance and also I am assuming their are cleaner ways to accomplish the needed tasks.
 
 https://files.engineering.com/getfile.aspx?folder=f250540c-d3f8-46de-bb47-74c6e6e3a354&file=NFPA_80A_Calculation_V2.0.mcdx
OK....
I have been able to solve the programming for any number "z" (z is a percentage between 20-100)… now i need to tackle the r_max values.

The first column/row of the matrix are for indexing to the correct value in the table/matrix.

floor(r_max) & ceil(r_max) work as long as the r_max value is 4 and 6... however i need a better way to get it to select the r_max values available to the left or right out of the options in row 0, except zero.

BTW the program returning "ERROR" is just a way i can get it to not work and light up red if someone enters an invalid percentage.
 
 https://files.engineering.com/getfile.aspx?folder=e85515f9-408b-471d-a873-bbd99d19f3d6&file=NFPA_80A_Calculation_V3.0.mcdx
Once upon a time wrote a function for double interpolation for universal usage. In the attached file I placed the table and the arguments from your example. However, this routine will not work with the free MathCad Express.

Yakpol
 
 https://files.engineering.com/getfile.aspx?folder=6a3ff51c-78cf-49be-838d-ce1641914a12&file=Double_interpolation_function_120920.mcdx
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top