MATLAB:使用quad/quadl 绘制积分
我想知道是否有人知道如何绘制使用quad/quadl 计算的积分,或者这是否可能。
我读到我可以将跟踪参数设置为非零,这会导致提供每次迭代的信息,但我不确定如何以及是否可以使用这些信息来绘制积分。
谢谢。
I would like to know if anybody knows how I can plot an integral calculated using quad/quadl, or if this is possible.
I read that I can set the trace parameter to be non-zero, and this results in the information of each iteration being provided, but I'm not sure how and if I can use the information to plot an integral.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无论如何,quad 和quadl 都不计算积分函数,即作为参数函数的积分。由于像这样的工具会迭代地工作,完善它们的估计,直到满足全局值的公差,因此它们不容易产生您想要的图。
您可以通过使用微分方程求解器来生成解(例如 ode45)来完成您想要的操作。
quad and quadl do not compute an integral function anyway, i.e., an integral as a function of the parameter. And since tools like this work iteratively, refining their estimate until it satisfies a tolerance on the global value, they are not easily made to produce the plot you desire.
You can do what you desire by using a differential equation solver to generate the solution, ode45 for example.