Code for discrete signal plot.

1 回表示 (過去 30 日間)
Syed JABBAR SHAH
Syed JABBAR SHAH 2021 年 10 月 24 日
回答済み: Srijith Kasaragod 2021 年 10 月 26 日
Convert the continuous signal described by y(t) = 10*sin 2*pi*t * into a discrete set of eight numbers (N=8) using a time increment of 0.125 s.
f=1, N=8, ts=0.125s
Code you help me to code this in matlab?
Thanks,
I want this resutls as shown below.
  1 件のコメント
Jaya
Jaya 2021 年 10 月 24 日
編集済み: Jaya 2021 年 10 月 24 日
I have coded this but since you said you want help to code this, first please provide the code that you have attempted. Because this question seems to be a homework question that you have directly asked.

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

回答 (1 件)

Srijith Kasaragod
Srijith Kasaragod 2021 年 10 月 26 日
Hi Syed,
Inorder to plot the signal, you have to first define discrete time instances and signal values. Time vector can be defined as:
t=0:0.125:N*0.125;
where N = 8 as per the question. Substituting 't' into 'y(t)' should give you corresponding discrete signal values. You can input 't' and 'y' vectors into 'stem' function to obtain the plot.

カテゴリ

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

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by