Display the points used to integrate a function using QUAD
Updated 29 May 2007

View License


QUADSHOW allows users to see the sequence of points at which QUAD evaluates their function during the course of numeric integration.


In the past, some users of QUAD have expressed confusion when they specified very large limits when trying to integrate functions that are nonzero over small intervals, and receive results that do not agree with other answers they have computed via other methods. With QUADSHOW, they can see where QUAD is evaluating their function, and can try to adjust their limits of integration appropriately.

QUAD expects the function the user wants to integrate to return an output vector the same size as the input vector. QUADSHOW detects when this is not the case and informs the user of this error.

The calling syntax for QUADSHOW is the same as the calling syntax for QUAD; this is deliberate, as it allows users to easily use QUADSHOW as a troubleshooting tool.


This function uses nested functions, which were introduced in MATLAB 7.0 (R14), so it will not run in versions of MATLAB prior to 7.0. I have tested it in both MATLAB 7.0 (R14) and MATLAB 7.4 (R2007a) on Windows.


One possible avenue for enhancement of this functionality would be to create a DBLQUADSHOW to show the progress of DBLQUAD. I intend to create such a function at some future time, but if you want to adapt QUADSHOW for this purpose before I do, please feel free to do so and post it to the File Exchange.

Cite As

Steven Lord (2024). QUADSHOW (https://www.mathworks.com/matlabcentral/fileexchange/15117-quadshow), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Just for fun in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes