Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
I understand that my S 2 and L x are both defined as vectors. I’m using a comparison operator (<) that compare scalars, not vectors. I have no clue how to make an if/else if statement work. Any assistance or advice would be extremely appreciated.
Solved! Go to Solution.
Thanks Werner.
We can go one more step to clarity by simplifying the arguments.
Bug in Prime? We must check in Mathcad 15!
Hi,
Enclosed is one way of doing it. S2 is a constant now.
I would prefer turning all calculations. which later should deal with vectors, into functions of scalars and call these functions later vectorized with the appropriate vectors as arguments:
BTW, you don't need the "else if" statement, a simple "else" is all thats needed.
Worksheet in P5 format attached.
Thanks Werner.
We can go one more step to clarity by simplifying the arguments.
Good idea! I had no looked at how Lx was defined and so did not notice the the expression was calculated three times from anew.
We still miss in Mathcad and Prime the option of turning a whole worksheet into a function with appropriate in- and outputs. Turning all calculations into function as I had suggested sure is the cleanest method from a math point of view but can get very clumsy and uncomfortable for more complicated worksheets.
I have it working now. Thank you All
As there seems to be no need to make S2 a vector (as Terry suggested in his first answer) the calculation can be simplified again a little bit:
Now Lx is the only argument of that function.