Calculate the right Riemann sum of f(x)=x^2+2x-1 on the interval I=[0,2] with 4 regular portions.

10 次查看(过去 30 天)
I am getting this error " Execution of script riemansum as a function is not supported".Can someone help?
  2 个评论
Yusuf Suer Erdem
Yusuf Suer Erdem 2021-11-21
编辑:Yusuf Suer Erdem 2021-11-21
I used it with this way. It was working properly but I was not able to select 4 regular points.
syms x
rsums(x^2+2*x-1,0,2)
Walter Roberson
Walter Roberson 2021-11-21
The first executable word of file riemansum.m is not "function", so MATLAB considers the file to be a script that can be executed but not called.
What is the first non-comment non-blank line of riemansum.m ?

请先登录,再进行评论。

采纳的回答

Shanmukha Voggu
Shanmukha Voggu 2021-12-2
Hi Vansh,
The link here might be helpful.
Hope this helps!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Numerical Integration and Differential Equations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by