Question: How do I use the if statement in combination with 2 conditions

Hello, this is probably painfully simple but I cannot figure it out... so there it goes

there are four set of equations, but only one solution can be assigned to the parameter p (which is the outcome of R1, R2, R3, or R4).

1: if `and`(x4 = 0, x1 > 0) then assign(solpR1) end if;

2: if x2 = 0 then assign(solpR2) end if;

3: if `and`(x1 = 0, x4 = 0) then assign(solpR3) end if;

4: if `and`(x3 = 0, x1 = 0) then assign(solpR4) end if;

Note that my Maple notation for the equations that contain 'and' read as follows (somehow it gets changed with copy paste)

1: if x4=0 and x1>0 then assign(solpR1) end if;

 

2: if x2 = 0 then assign(solpR2) end if;

3: if x1=0 and x4=0 then assign(solpR1) end if;

4: if x3=0 and if x1=0 then assign(solpR1) end if;

Since this connotation problem messes up a more complicated set of equations your feedback is more than appreciated!







 

Please Wait...