Skip to main content
1-Visitor
November 1, 2015
Question

Equation as text using trial and error

  • November 1, 2015
  • 2 replies
  • 2694 views

Hi,

I wanted a equation as text which should appear when a situation/ condition is satisfied.

Please find attached excel sheet for the same.

Below are few examples as to explain the requirement/question.

Example1 :- in this example L1<z1, hence the limit of integration of I1 changes from 0 to L1 in first equation.

I got the solution i.e the value of I1,  but for representation I require the equation too in the MATHCAD sheet. as shown in the example.

Therefore, the value along with equation should appear on the sheet.

z1=12m, z2=15m, z3=18m, z4=20m,z5=20m

Example 1 (1rd layer).jpg

Example2 :- in this example z1<L1<z2, hence the limit of integration of I2 changes from z1 to L1 in first equation..Example 2 (2rd layer).jpg

Example3 :- in this example z2<L1<z3, hence the limit of integration of I3 changes from z2 to L1 in first equation.

Example 3 (3rd layer).jpg

Example4 :- in this example z4<L1<z5, hence the limit of integration of I5 changes from z4 to L1 in first equationexample 5 (5th layer).jpg


Thank you for your help.

2 replies

kshaikh1-VisitorAuthor
1-Visitor
November 1, 2015
25-Diamond I
November 1, 2015

Is what I had done with I4 something you are looking for?

WE

23-Emerald V
November 1, 2015

Khalid Shaikh wrote:

Hi,

I wanted a equation as text which should appear when a situation/ condition is satisfied.

Please find attached excel sheet for the same.

Below are few examples as to explain the requirement/question.

Example1 :- in this example L1<z1, hence the limit of integration of I1 changes from 0 to L1 in first equation.

I got the solution i.e the value of I1,  but for representation I require the equation too in the MATHCAD sheet. as shown in the example.

Therefore, the value along with equation should appear on the sheet.

z1=12m, z2=15m, z3=18m, z4=20m,z5=20m

Example2 :- in this example z1<L1<z2, hence the limit of integration of I2 changes from z1 to L1 in first equation..

Example3 :- in this example z2<L1<z3, hence the limit of integration of I3 changes from z2 to L1 in first equation.

Example4 :- in this example z4<L1<z5, hence the limit of integration of I5 changes from z4 to L1 in first equation


Thank you for your help.

I'm afraid that I can't work out what you mean by "write the equation" - I can't find anything marked as such in the thread messages or the worksheet.  Could you please point me to where you have written what you want returning?  Is it in the Excel workbook that you mention?  If so, it doesn't appear to have attached to the message when I look at it.  Or do you mean the list of layers and their respective frictions at the bottom of the Mathcad worksheet?

Here' one approach you might want to think about, though.  I'd be tempted to convert your equations into something that would be easier to calculate in a loop; this would mean you could change the number of layers without too much further work.

Stuart

25-Diamond I
November 1, 2015

My crystal ball told me that the idea was to just display the appropriate integral as a formula which was used to derive the value for the variables I.4, etc.

But then, I may be wrong.

Werner

kshaikh1-VisitorAuthor
1-Visitor
November 2, 2015

What Mr,. Werner is exactly what I want only the formula to be displayed but also with the condition depending on the value of "L1"

If z1<L1 then formulas representing I1, I2,I3,I4,I5 should be as shown in example1.

Example 1 (1rd layer).jpg

if  z1<L1<z2 then formulas representing I1, I2,I3,I4,I5 should be as shown in example2

Example 2 (2rd layer).jpg

if z2<L1<z3 then formulas representing I1, I2,I3,I4,I5 should be as shown in example3

Example 3 (3rd layer).jpg

if z4<L1<z5 then formulas representing I1, I2,I3,I4,I5 should be as shown in example5

example 5 (5th layer).jpg

etc

Thank you all for replies.

Khalid