Skip to main content
1-Visitor
March 22, 2014
Solved

Compiling an "IF" statement - need help

  • March 22, 2014
  • 6 replies
  • 3879 views

Capture.JPG

What are the symbols that look like the caret symbol between 0 psf and pg / 20 psf and theta/deg? How do I insert / use them? I finally figured out how to build my statements, then I ran into these. I think they are operators, but I can't seem to find a name or toolbar to insert them.

Chuck

Best answer by Werner_E

Don't worry - everybody can see all postings (otherwise the benefit of that forum would be very limited).

Situation is as I suspected. ORIGIN is still at its default 0. So the elements of four element vector are numbered 0,1,2,3. But you used 1,2,3,4 and its the 4 which throws the error (and also the 2 for a matrix with two columns).

23.03.png

6 replies

cdenson-21-VisitorAuthor
1-Visitor
March 22, 2014

if it helps, it would be where the additional "if" statements are below:

Capture.JPG

19-Tanzanite
March 22, 2014

It is the "And" operator, which you can get from the boolean toolbar, or by typing Crtl + &.

cdenson-21-VisitorAuthor
1-Visitor
March 23, 2014

Tnanks for the help - I will blame it on being tired, I should have seen that one when I was grabbing other items off of the boolean toolbar.

Another roadblock - I seem to have an array issue here and my unfamiliarity with matrices / arrays has me stumped. I am not even sure what to ask to get help on this one. Any ideas? I am trying to use the function to generate a matix of the possible answers for multiple pressure coefficients. I used the matrix toolbar subscript to generate the subscripts for "p" and "x" The power of the software is incredible, but garbage in still = garbage out. I am trying to build this using MathCAD 14 if it makes a difference.

Capture.JPG

25-Diamond I
March 23, 2014

What value have you set ORIGIN to? If its left at its default value (which is a good idea anyway) its 0, That means that vector and matrix elements are counted beginning from 0. E.g. row count runs from 0 to rows(x) - 1. That could be the cause for the error you show - there would be n row number 1 or column number 2 for c.pnw.

For your next question - please post worksheets, not just pics. Its hard to impossible to debug a pic.

cdenson-21-VisitorAuthor
1-Visitor
March 23, 2014

Werner, thanks for the guidance! I still haven't figured it out, but I am still trying different things without any success yet. For some reason, I thought that it would be so simple that someone would look at my problem and say something like, "hit the equal sign" or something. Lesson learned, worksheet attached.

OK, trying to figure this out still, I think ORIGIN is "0" as I haven't changed it (that I know of) and I get the same error message for P(cpp) , P(cpnw) or P(cpnl) - I hope I just typed something versus using an input from a toolbox or something. Any help would be appreciated, worksheet attached for reference.

24-Ruby IV
March 23, 2014

Chuck Denson wrote:

Capture.JPG

What are the symbols that look like the caret symbol between 0 psf and pg / 20 psf and theta/deg

I cannot remember it too and do in Mathcad 15 so:

AndOr1.png

But we have not in Prime the infix operator

AndOrPrime.png

cdenson-21-VisitorAuthor
1-Visitor
March 23, 2014

Worksheet for review - I put it in my reply to Werner, but not sure all can see it on that reply. Still have issues with the vectors / matrices.

Werner_E25-Diamond IAnswer
25-Diamond I
March 23, 2014

Don't worry - everybody can see all postings (otherwise the benefit of that forum would be very limited).

Situation is as I suspected. ORIGIN is still at its default 0. So the elements of four element vector are numbered 0,1,2,3. But you used 1,2,3,4 and its the 4 which throws the error (and also the 2 for a matrix with two columns).

23.03.png

cdenson-21-VisitorAuthor
1-Visitor
March 24, 2014

Thanks to all for the help, MathCAD is creating a monster and that monster is ME! I can't wait to automate more of my calculations eventhough I am suffering through a few learning pains as I go. I really appreciate the help and explanations of the power of this software.