필터 지우기
필터 지우기

How do you integrate a constant?

조회 수: 26 (최근 30일)
Manil Athapattu
Manil Athapattu 2017년 6월 29일
편집: Torsten 2022년 11월 21일
theta and miu are constants
theta = 0.01305
miu = 0.0546
const = @(x) tan(theta + miu)
r = integral(constant,0,1)
  댓글 수: 1
Jan
Jan 2017년 6월 29일
The integral of a constant function is the size of the rectangle between the curve and the X axis: const * (1 - 0).

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

채택된 답변

Joshua
Joshua 2017년 6월 29일
편집: Torsten 2022년 11월 21일
theta = 0.01305
theta = 0.0131
miu = 0.0546
miu = 0.0546
const = @(x) tan(theta + miu)+0*x
const = function_handle with value:
@(x)tan(theta+miu)+0*x
r = integral(const,0,1)
r = 0.0678
  댓글 수: 2
Yianni Koumarnetos
Yianni Koumarnetos 2022년 11월 21일
I am doing this and it is telling me that the integral is an error.
Torsten
Torsten 2022년 11월 21일
편집: Torsten 2022년 11월 21일
Don't forget the +0*x when integrating your constant function.
Or use
theta = 0.01305
theta = 0.0131
miu = 0.0546
miu = 0.0546
const = @(x) tan(theta + miu)
const = function_handle with value:
@(x)tan(theta+miu)
r = integral(const,0,1,'ArrayValued',true)
r = 0.0678

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Web Services에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by