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

5 Ansichten (letzte 30 Tage)
Luciano Raso
Luciano Raso am 10 Apr. 2012
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!!!

Akzeptierte Antwort

Mike Hosea
Mike Hosea am 11 Apr. 2012
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 Kommentar
Luciano Raso
Luciano Raso am 12 Apr. 2012
Hi Mike!
thanks a lot for your answer. I do not why i haven't seen it! Thanks!
Luciano

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by