フィルターのクリア

another basic questions regarding integration

4 ビュー (過去 30 日間)
Eliraz Nahum
Eliraz Nahum 2018 年 9 月 21 日
コメント済み: Star Strider 2018 年 9 月 22 日
hey,
I saw the attached code and couldn't realize what its mathematical meaning is.
syms x y
f=sin(x)*y
integral=int(f,x,y,y)

採用された回答

Star Strider
Star Strider 2018 年 9 月 21 日
It ‘translates’ to: ‘integrate f with respect to ‘x’ from ‘y’ to ‘y’. Since the limits of integration are the same, the result is zero (as would be expected).
If you’re copying this from somewhere else, the statement is a mystery to me as well. I can’t imagine the reason anyone would write it.
Also, integral is the name of a built-in MATLAB function that does numerical integration. It is not good programming practice to do that, since it ‘overshadows’ the function name with the variable, causing serious problems if you later want to use the integral function.

その他の回答 (1 件)

Eliraz Nahum
Eliraz Nahum 2018 年 9 月 22 日
thanks
  1 件のコメント
Star Strider
Star Strider 2018 年 9 月 22 日
As always, my pleasure.

サインインしてコメントする。

タグ

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by