How can I do integration in MATLAB without "int" function?
6 ビュー (過去 30 日間)
古いコメントを表示
MathWorks Support Team
2018 年 7 月 24 日
編集済み: MathWorks Support Team
2021 年 12 月 31 日
I am trying to do basic integration in MATLAB.
From the online documentation, I see that I can use the "int" function:
However, when I try to use it, I get an error saying that I do not have a license to run the function.
採用された回答
MathWorks Support Team
2021 年 12 月 21 日
編集済み: MathWorks Support Team
2021 年 11 月 17 日
This is because the "int" function does not come with the base MATLAB, but the Symbolic Math Toolbox:
You can check whether you have the Symbolic Math Toolbox installed by executing the following command in MATLAB's Command Window:
>> ver
If "Symbolic Math Toolbox" is not listed as the output of the "ver" command, you can still do numerical integration in MATLAB using the "integral" function:
For example, in MATLAB you can do:
>> fun = @(x) exp(-x.^2).*log(x).^2;
>> q = integral(fun,0,Inf)
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!