plot function with matlab

Status
Not open for further replies.

Bou

Full Member level 3
Joined
Mar 6, 2013
Messages
159
Helped
0
Reputation
0
Reaction score
0
Trophy points
16
Activity points
0
Hello,

If we have a function like this

f(x,y)

ans we want to plot it with matlab with a condition that y>x else f(x,y) is indifined

how we can do it?

10x
 

Not clear whether x is the domain of the f function, or if you're considering another implicit variable, such as t for instance representing the time line, therefore I'm assuming the 2nd case.

You can use the y>x constraint to create another curve ( e.g: z ) which contains the same value of f. You will now plot z(x,y) instead of f(x,y), but setting the range of the plot function as the size of the z funcion, such as something like that ( not tested ) :

Code:
axis([ min(t) max(t) min(z) max(z)])
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…