Matlab Program to evaluate a function

 Write a Matlab program to evaluate a function f(x,y) for any two user-specified values x and y. The function f(x,y) is defined as follows.

f(x,y)= x+y , if x>=0 and y>=0

           x+y^2 , if x>=0 and y<0

           x^2+y , if x<0 and y>=0

           x^2+y^2 , if x<0 and y<0

Soln



No comments:

Powered by Blogger.