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

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Conditional function error

Lurky
1-Visitor

Conditional function error

As part of my coursework, I have to calculate the self-inductance of a single turn coil.

We have been provided with a set of nested equations to estimate the value, which have been presented in mathcad format.

However, when I tried to type in the equation, I got an error telling me the final "otherwise" statement needs to be matched with an "if" statement.

Could someone please point me in the right direction?

ACCEPTED SOLUTION

Accepted Solutions
VladimirN
24-Ruby II
(To:Lurky)

At you function "otherwise" is used not correctly (not for all expression, but only for the last item).

Pic_2.png

Pic_1.png

View solution in original post

8 REPLIES 8
FDS
13-Aquamarine
13-Aquamarine
(To:Lurky)

Greg, most likely you did not use the "otherwise" from the programming palet

Greg.gif

VladimirN
24-Ruby II
(To:Lurky)

At you function "otherwise" is used not correctly (not for all expression, but only for the last item).

Pic_2.png

Pic_1.png

Lurky
1-Visitor
(To:VladimirN)

Thanks. I didn't realise that I added the "otherwise" in the wrong order.

VladimirN
24-Ruby II
(To:Lurky)

You're welcome.

I use in same cases if-function:

if.PNG

That is an interesting suggestion. I was unaware that you could nest if statements like that.

Greg Milway wrote:

That is an interesting suggestion. I was unaware that you could nest if statements like that.

Thanks. But I think the best solution is - see the picture:

if.png

I agree

Mike

Announcements

Top Tags