How would I make a program with nested if statements in matlab?
I have to make a program asking me to place x+y if x>=0 and y>=0, or x+y^2 if x>=0 and y<0, x^2+y if x<0 and y>=0 or x^2 +y^2 if x<0 and y<0 using nested if constructs where the outer construct evaluates the x and the inner the y. I get this mostly but if statements only evaluate the outer construct since its what occurs first. How would I make this program as the question states?




