MATLAB Answers

How to fucntions like plot f(x,y) = 2 when 0<=x<=1 and 0<=y<=x

2 views (last 30 days)
WR102ka
WR102ka on 27 Mar 2018
Commented: WR102ka on 27 Mar 2018
I'm struggling to do so. Any help will be appriciated.

  1 Comment

Adam
Adam on 27 Mar 2018
f(x,y) = 2 is just a single point result isn't it? Irrespective of x and y the answer is 2

Sign in to comment.

Accepted Answer

Christopher Creutzig
Christopher Creutzig on 27 Mar 2018
If the region to plot over were a simple 0 ≤ x ≤ 1 and 0 ≤ y ≤ 1, you could use fimplicit(f(x,y) - 2, [0 1 0 1]). I don't think there is a good way of restricting the plotting domain to the triangle you are looking for, though. You could just cover the upper triangle with a fill([0 1 1], [1 0 1], [1 1 1]) call, I guess …

  1 Comment

WR102ka
WR102ka on 27 Mar 2018
I guess this is as close as we can get. Thank you

Sign in to comment.

More Answers (0)

Sign in to answer this question.


Translated by