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!