numerical integration with nonarray function
古いコメントを表示
Hello, guys,
I have a trouble in using numerical integration command. The integrand in my case is det(x*A),x is the variable, and A is a n*n matrix. I noticed that nearly all the numerical integration command has requirement of array function, which means, they have to use .*, ./ when needed? do we have numerical integration command without such requirement?
Thank you very much!
Clair
採用された回答
その他の回答 (2 件)
Yao Li
2013 年 4 月 12 日
Assuming
x=[x0,x1,x2];
B=[det(x0*A) det(x1*A) det(x2*A)];
trapz(x,B)
Roger Stafford
2013 年 4 月 12 日
With x used as a vector, your integrand can be written as:
(x.^n)*det(A)
with the x factored out, which should integrate very nicely. However, why bother to do numerical integration when the indefinite integral is already known from elementary calculus, namely
x^(n+!)/(n+1)*det(A)
1 件のコメント
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!