필터 지우기
필터 지우기

Integrating using sums(riemann sums)

조회 수: 17 (최근 30일)
WILLBES BANDA
WILLBES BANDA 2020년 4월 1일
댓글: Elvin 2023년 7월 20일
Hi, i want to find the integral of function f without using the int function with the limits 5 and 17 . I want to find the riemann sum of the function f.
I tried solving it by using the int function but now i want to find the area withou using int. below is my code but n should represent the number of divisions that gives an accuracy of 10^-4 , i am not sure if my value of n is correct or not? how do i find n and the area (c) ?please help.
format longG
syms x
f = 2*pi*(0.16*(0.25-(x-1)^2)+44.52)*(1+(-0.32*x - 0.32)^2)^1/2;
a = int(f,5,17.688);
b = sym(a);
c = double(b);
n = (17.688-5)/0.0001;
SurfaceArea = [c n]

채택된 답변

Birdman
Birdman 2020년 4월 1일
You may use rsums. It allows you to interactively calculate the riemann sum integral:
rsums(f,5,17.688)
  댓글 수: 10
WILLBES BANDA
WILLBES BANDA 2020년 4월 1일
Noted. Thank you Honourable
Elvin
Elvin 2023년 7월 20일
I tried this but it says "unrecognized function"

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by