在 MATLAB 中,可以使用 integral 函数求解定积分。这个函数的语法为:
Q = integral(fun,a,b)
其中,fun 是要求积分的函数句柄,a 和 b 分别是积分下限和上限。返回值 Q 是积分的近似值。