フィルターのクリア

How could I do a summation of (y) so I can create a signal that goes from 0 to 30 sec repeating (y) every 3 seconds in a graph.

1 回表示 (過去 30 日間)
A = 1.15;
t = linspace(-2, 1, 1000);
a = exp(-0.5*t);
y = A*a.*(sin(2*pi*3*t)) .* (ustep(t+2)-ustep(t));
figure
plot(t, y, 'LineWidth', 2)
xlabel('t');
ylabel('y');
title('L2E2');
grid on;

採用された回答

Paul
Paul 2022 年 3 月 29 日
Maybe this is the goal? Note that I modified the definition of y to make it in line with what I assumed the question means.
A = 1.15;
a = @(t) exp(-0.5*t);
ustep = @(t) t>=0;
y = @(t) A*a(t).*(sin(2*pi*3*t)) .* (ustep(t) - ustep(t-2)); % changed from original code
t = -3:.01:3;
figure;
plot(t,y(t))
t = 0:.01:30;
plot(t,y(mod(t,3)))

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by