Integration of a function from R^1 to R^n

조회 수: 5 (최근 30일)
Luciano Raso
Luciano Raso 2012년 4월 10일
I have calculate the integral of a function.
This is a simple task: The function quad works fine for function from R^1 to R^1, and quad2 for R^2 to R^1 functions.
however, a way to calculate a simple R^1 to R^n functions does not exist! To be clear, i mean domain R^1 and range R^n, like a curve, for example.
I will appreciate any help!!!

채택된 답변

Mike Hosea
Mike Hosea 2012년 4월 11일
The integral of a vector-valued function is vector-valued. You simply integrate each component. This can be done with QUADV or with INTEGRAL (new function in R2012a) using the 'ArrayValued' option set to true.
>> F = @(x)[x,sin(x),tan(x),log(x),exp(x)]
F =
@(x)[x,sin(x),tan(x),log(x),exp(x)]
>> integral(F,0,1,'ArrayValued',true)
ans =
0.5000 0.4597 0.6156 -1.0000 1.7183
>> quadv(F,0,1)
ans =
0.5000 0.4597 0.6156 -1.0000 1.7183
Did you want to calculate arc length or something else instead? -- Mike
  댓글 수: 1
Luciano Raso
Luciano Raso 2012년 4월 12일
Hi Mike!
thanks a lot for your answer. I do not why i haven't seen it! Thanks!
Luciano

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by