How to Plot a function that contains summation?
古いコメントを表示
How can I plot the attached two functions with limits from -pi to pi for different values of m ?
5 件のコメント
Walter Roberson
2021 年 9 月 20 日
The first equation has five open-bracket '(' but only four close-bracket ')'
Muhammad Qaisar Fahim
2021 年 9 月 20 日
Walter Roberson
2021 年 9 月 20 日
But in real-life, the volunteers are not able to assist with the first equation because they do not know where the missing ) should go.
Muhammad Qaisar Fahim
2021 年 9 月 20 日
x=[-pi:0.1:pi]
figure
for alpha=1:10
m = (1:alpha).';
Function_5 = (pi/2) + sum(((2 .* (-1).^m-1) .* cos(m.*x) ./ (pi .* m.^2)),1);
plot(x, Function_5, 'displayname', "\alpha = " + alpha);
hold on
end
legend show
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Special Values についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


