## "IF" function with undefined "OTHERWISE" item?

## "IF" function with undefined "OTHERWISE" item?

(OP)

Hi,

Please, could you help me? I have problem with "IF" function. I have function named "f1" and "f2".

f1:=0..10

f2:=0..10

Sum of these function cannot be greater that 10. If the sum is greater, then function is undefined.

I tried do that by the help of the "IF" function.

if(f1+f2<10,f1+f2,0)

But there is "OTHERWISE" item. I use "0", but would like to use "UNDEFINED", or something like that.

It is possible to do that?

Thanks

Please, could you help me? I have problem with "IF" function. I have function named "f1" and "f2".

f1:=0..10

f2:=0..10

Sum of these function cannot be greater that 10. If the sum is greater, then function is undefined.

I tried do that by the help of the "IF" function.

if(f1+f2<10,f1+f2,0)

But there is "OTHERWISE" item. I use "0", but would like to use "UNDEFINED", or something like that.

It is possible to do that?

Thanks

## RE: "IF" function with undefined "OTHERWISE" item?

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

## RE: "IF" function with undefined "OTHERWISE" item?

## RE: "IF" function with undefined "OTHERWISE" item?

Peter

## RE: "IF" function with undefined "OTHERWISE" item?

Unfortunately you don't have what you think you have.

As written, what you have is two range variables - these are implied for loops.

You can assign NaN (Not a Number) to a result to indicate undefined.

I presume you are doing 'numeric' calculations rather than fancy formula manipulation (symbols).

f1(a):=a

f2(b):=b

[f1, f2 not really needed]

F3(a,b):=if(a+b>10,NaN,a+b)

Philip

Stick a work sheet on http://collab.mathsoft.com/~Mathcad2000 for more replies

## RE: "IF" function with undefined "OTHERWISE" item?

It is fact, that I didnt need funcitons f1 and f2 :) ,

but NaN didnĀ“t help me :(

When I used NaN, then 3d graph diseppeared. :(

I create attachment to show you my problem with zero.

## RE: "IF" function with undefined "OTHERWISE" item?

Peter

## RE: "IF" function with undefined "OTHERWISE" item?

There are still a large community who are sticking at V11 until V14/15 becomes more stable and efficient.

V14 is good for pro/e integration but still has a couple of rough edges for those using symbolics [has new MuPad engine].

Philip

## RE: "IF" function with undefined "OTHERWISE" item?

I tried manually set the range but this was without effect :(

I saved it into a test.mcd W11 file

## RE: "IF" function with undefined "OTHERWISE" item?

What am I looking for that isn't working?