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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

4-Participant

## Matlab short-circuiting behavior into Mathcad

Hi, i need this operator in mathcad (ll)

ll  Represents a logical `OR` operation that employs short-circuiting behavior. That is, `expr2` is not evaluated if `expr1` is logical `1` (`true`). Each expression must evaluate to a scalar logical result.

7 REPLIES 7
16-Pearl
(To:JB_9681141)

Look at the Boolean toolbar.  The v symbol does what you want.

Alan

23-Emerald III
(To:AlanStevens)

It does the OR, but it doesn't 'short-circuit', does it?

Luc

24-Ruby V
(To:LucMeekes)

@LucMeekes wrote:

It does the OR, but it doesn't 'short-circuit', does it?

Luc

Mathcads OR does short circuit eval, otherwise doIt(0) would throw an error in the following example

23-Emerald III
(To:Werner_E)

but Prime:

I've been using Prime too much...

Luc

23-Emerald I
(To:LucMeekes)

ll  Represents a logical `OR` operation that employs short-circuiting behavior. That is, `expr2` is not evaluated if `expr1` is logical `1` (`true`). Each expression must evaluate to a scalar logical result.

23-Emerald III
(To:JB_9681141)

I have found no reliable way to do that in Mathcad.

Do you really need it to short-circuit?

If your first expression is 'per',  then the second expression 'per<0' can also be calculated...

Luc

23-Emerald I
(To:JB_9681141)

Mathcad (or at least as I use it) doesn't have functions that return logical true/false.  How about

playing games:

Announcements