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
Andrei Bobrov 2012년 2월 15일

0 개 추천

f = @(x).... - any your anonymous function, try:
out = reshape(arrayfun(@(i1)quad(f,x1(i1),x2(i1)),1:numel(x1)),size(x1));

카테고리

도움말 센터 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

질문:

2012년 2월 15일

Community Treasure Hunt

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

Start Hunting!

Translated by