How would I plot a piecewise summation.

12 ビュー (過去 30 日間)
Ben Phelps
Ben Phelps 2020 年 11 月 27 日
コメント済み: Ben Phelps 2020 年 11 月 29 日
Would anyone be able to help me to plot this equation in MATLAB?

採用された回答

Alan Stevens
Alan Stevens 2020 年 11 月 28 日
Something like this?
tau = 1;
t = 0:0.1:10;
n = ceil(t/tau);
for i = 1:numel(n)
S = 0;
for k = 1:n(i)
S = S + (-1)^k*(t(i) - (k-1)*tau)^k/factorial(k);
end
u(i) = 1 + S;
end
plot(t,u),grid
xlabel('t'),ylabel('u')
  1 件のコメント
Ben Phelps
Ben Phelps 2020 年 11 月 29 日
Yes thankyou so much!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by