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 Center および File ExchangeMATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by