Integral and arrays
古いコメントを表示
Dear Fellows,
I have one question for one problem. I have integral int(f(x),'x',x1,x2)
Now, x is array (100 members), and also x1 and x2 are depend on x so x1 and x2 (boundaries) are also arrays (100 members too).
How to solve this integral? How to make loop?
Thanks for any help
Best regards,
Nik
回答 (1 件)
Andrei Bobrov
2012 年 2 月 15 日
out = reshape(arrayfun(@(i1)quad(f,x1(i1),x2(i1)),1:numel(x1)),size(x1));
カテゴリ
ヘルプ センター および File Exchange で Server Management についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!