0

I need to draw a boundary on a x-y plane with the followings given:

a) a matrix called 'decision_region' with size(41,41), filled with either 1 or 0. Those 1's and 0's are separated by a boundary which is y =x.

That is for decision_region(i,j), with positions that satisfied i > j, are all 1's.

b) x, and y array with size(1,41).

I know how to use surf(x,y,decision_region) to create a surface plot. But how can I get a y = x plot in a x-y plane?

M--
  • 25,431
  • 8
  • 61
  • 93
Guangyue He
  • 269
  • 1
  • 3
  • 14

1 Answers1

1

Your question is not very clear, but from what I understand

hold on
plot(x, y)

should overlay the desired boundary over the surface.

Ratbert
  • 5,463
  • 2
  • 18
  • 37