You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
This routine will shade the area of a 2-D plot between two user defined vectors. Simply pass the two vectors, and their corresponding horizontal coordinates, select your fill color and transparency level and viola! You have a figure that is colored in between the two input vectors.
Cite As
John Bockstege (2026). Shade area between two curves (https://uk.mathworks.com/matlabcentral/fileexchange/13188-shade-area-between-two-curves), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired: anomaly, Simpsons Rule Demonstration, gtfill(x,y1,y2,n,c1,c2), fill_between, SMA, MACD, RSI (SMR) Trading Algorithm, h-coefficient
General Information
- Version 1.1.0.0 (1.75 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
