Matlab integral funtion error
이전 댓글 표시
Hi, I can't seem to get the integral function to work correctly.
syms x
z=1/(3-1)
f=@(x)(x.*exp((x.^2)-1))/sin(x)
fi=integral(f,1,3)
This is my code, however the integral function keeps giving errors and I am unable to fix the problem. Could someone please help? Thanks in advance!
채택된 답변
추가 답변 (2개)
Walter Roberson
2021년 8월 4일
1 개 추천
f=@(x)(x.*exp((x.^2)-1))./sin(x)
Pere Garau Burguera
2021년 8월 4일
The solution is given in the error message, you should use
fi=integral(f,1,3,'ArrayValued',true);
Cheers,
Pere
카테고리
도움말 센터 및 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!