Code for discrete signal plot.
4 views (last 30 days)
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?
I want this resutls as shown below.
Srijith Kasaragod on 26 Oct 2021
Inorder to plot the signal, you have to first define discrete time instances and signal values. Time vector can be defined as:
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.