integration problem
古いコメントを表示
I need to integrate f(x)*cos(x)dx for x from 0 to 2*pi.
For f(x), I have a list of 33 y-values with corresponding x=[0:2*pi/32:2*pi].
How do I integrate this in MATLAB?
回答 (2 件)
Walter Roberson
2012 年 5 月 17 日
trapz(x,y .* cos(x))
mohan krishna
2023 年 2 月 15 日
0 投票
integral phi/2 0 cosxdx
カテゴリ
ヘルプ センター および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!