cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

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

3-Visitor

## Help "This Value must be a scalar"

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.

1 ACCEPTED SOLUTION

Accepted Solutions
21-Topaz I
(To:Werner_E)

Thanks Werner.

We can go one more step to clarity by simplifying the arguments.

7 REPLIES 7
24-Ruby IV
(To:L90_STR)

Bug in Prime? We must check in Mathcad 15!

21-Topaz I
(To:L90_STR)

Hi,

Enclosed is one way of doing it.  S2 is a constant now.

24-Ruby V
(To:L90_STR)

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.

21-Topaz I
(To:Werner_E)

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.

3-Visitor
(To:Werner_E)

I have it working now.  Thank you All

24-Ruby V
(To:L90_STR)

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.

Announcements
Top Tags