Integral a function handle of two variables with respect to a variable
조회 수: 19 (최근 30일)
이전 댓글 표시
f = @(x, y) x+y;
g = @(x) integral(@(y) f(x,y),0,1)
t = (0:0.1:1);
g(t)
It is wrong! How can I get the expected result?
댓글 수: 0
채택된 답변
Walter Roberson
2021년 12월 2일
f = @(x, y) x+y;
g = @(x) integral(@(y) f(x,y), 0, 1, 'arrayvalued', true)
t = (0:0.1:1);
g(t)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Oceanography and Hydrology에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!