I'm having trouble using fill to shade the area between two curves. The code I'm using is
fill(x,[y1 y2],'k')
I've also tried
fill([x x],[y1 y2],'k')
which gives the same result. Is there something obvious I'm missing? Below is the plot I'm getting. I'd like to shade the are between the two curves, not between the first and last y value of each curve. Ideas?
Best Answer