Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi, how do I write this for loop in MathCad?
My fb is (similar to the first line of code)
**Side note: I need to evaluate these values as rc goes from 2-60.
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
This is my homework question as well, just to give you some background on why I need rc to go from 2-60.
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.
See attached. Notes:
i) I've set the ORIGIN to 1 to match that of Matlab.
ii) I've used subscripts, which are Mathcad's equivalent to Matlab's indexing.
iii) I'm not sure the "if" condition, that you were unsure of, was worth incorporating as the condition is never met (at least, not in the data set you supplied)!
Alan
Well, here's a start. Two files attached, one a Prime 6.0 Express, and a pdf of that file.
You need to check units, either use them (I suggest) or don't at all, things get confusing when you mix! I applied units to get an equation to balance. You also had an unsubscripted g that Mathcad assumed was a built-in constant.
This will at least give you a place to start.