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

조회 수: 1 (최근 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에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by