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

10 Ansichten (letzte 30 Tage)
I am getting this error " Execution of script riemansum as a function is not supported".Can someone help?
  2 Kommentare
Yusuf Suer Erdem
Yusuf Suer Erdem am 21 Nov. 2021
Bearbeitet: Yusuf Suer Erdem am 21 Nov. 2021
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 am 21 Nov. 2021
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 ?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Numerical Integration and Differential Equations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by