필터 지우기
필터 지우기

Integrating array of functions

조회 수: 4 (최근 30일)
w
w 2012년 1월 11일
편집: Walter Roberson 2015년 5월 4일
Hi people,
I have an array of functions, something like func(x,y)=[func1(x,y) func2(x,y) ... funcN(x,y)]
Now I want to integrate func(x,y). I.e., I want to integrate each component of func(x,y). How can I do that?
All information I could find are about function of arrays, instead of array of functions.
Thanks in advance.
GQ

채택된 답변

arun
arun 2012년 1월 12일
편집: Walter Roberson 2015년 5월 4일
In this calculation i have assumed that you are doing double integration first w.r.t y then x. First define symbolic matrix. Then perform double integration.
>> syms x y
>> a=[x.^2+y x+y];
>> int(int(a,y, 0, sin(x)), 0, pi)
In this calculation y limit is from 0 to sin(x) and x limit is from 0 to pi.
  댓글 수: 1
w
w 2012년 1월 13일
Thanks a lot! This works!
I also found another solution.
>> funchandler={@(x,y)x^2+y, @(x,y)2x,@(x,y)x-y};
Then I can proceed to integrate using
>>dblquad(funchandler{1},xmin,xmax,ymin,ymax)
etc.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2012년 1월 11일
There is no routine provided for this, unless perhaps the Symbolic Toolkit could handle it.
  댓글 수: 1
w
w 2012년 1월 11일
Thanks for saving my time...

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by