Concept Flow - Numerical integration (integral, trapz)
Define function f(x)
Choose integration limits a and b
Select method: integral or trapz
If integral
Call integral
Compute result
Return integral
Output result
This flow shows how MATLAB computes an integral numerically using either the integral function or the trapz function by defining the function, limits, and method, then calculating and returning the result.