How would I plot the addition of the following continuous time signal; should I determine a function as x1(t) and then plot the addition of the 2 functions?

1 回表示 (過去 30 日間)
x1(t) = {2 -3<t<0 (this is the piecemeal function)
{t/3 0<t<3
{0 otherwise
using t = -10:0.01:10 plot the following in a figure
x1(t+1) &
x1[(t/2)-1]
  2 件のコメント
Rik
Rik 2020 年 4 月 6 日
@Andre, instead of flagging your question as unclear, you could also edit your question to make it more clear.
Andre Khosrow
Andre Khosrow 2020 年 4 月 6 日
Ah ok; I fixed it up, also fixed some of the number I mistakingly put. I feel bad as someone has already answered.

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

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 4 月 5 日
x1 = @(t) (-3 < t & t < 0).*(-1) + (0 < t & t < 3).*t/3;
t = -10:0.01:10;
y1 = x1(3*t+1);
y2 = x1(-t/2-1);
figure();
axes();
hold on
plot(t, y1)
plot(t, y2)
legend({'y1', 'y2'});

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMeasurements and Feature Extraction についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by