Home » Computer » How would I make a program with nested if statements in matlab?

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?

Incoming search terms for the article:

matlab nested if,matlab nested if statements

Related

About This Post
Posted by admin on Jan 28th, 2010 and filed under Computer. You can follow any responses to this entry through the RSS 2.0. You can skip to the end and leave a response. Pinging is currently not allowed.

You must be logged in to post a comment Login