Skip to main content
1-Visitor
April 7, 2020
Question

For/If Loop (matlab to mathcad)

  • April 7, 2020
  • 1 reply
  • 3012 views

Hi, how do I write this for loop in MathCad?

 

sydfus_0-1586292148726.png

My fb is (similar to the first line of code)

sydfus_1-1586292235858.png

**Side note: I need to evaluate these values as rc goes from 2-60.

 

1 reply

23-Emerald IV
April 7, 2020

The matlab code appears to use fb as an array, rather than a function. If you do need a FOR loop in Mathcad, you need to make sure that you work with arrays.

If you:

- Explain what the matlab code is supposed to do, and

- Attach your Mathcad file

We may be able to help you.

 

Success!
Luc

sydfus1-VisitorAuthor
1-Visitor
April 7, 2020

This is my homework question as well, just to give you some background on why I need rc to go from 2-60.

sydfus_0-1586295423015.png

 

sydfus1-VisitorAuthor
1-Visitor
April 7, 2020

The matlab code says that if fb > fst, then we need to set fb=fst and calculate T04 instead of taking the T04 we were given. If fb<fst than we keep the T04 we were given and can continue to calculate for P04.