Unit Step and Discrete Delta function Data Sequence
조회 수: 16 (최근 30일)
이전 댓글 표시
Hello,
I am curious about solving the following problem. Using an index vector from -3 to 14, I must create a data sequence consisting of the following: x[n] = u[n] * s[n] + 1.4 * d[n-3]
u[n] being the unit step function
s[n] being the sampled sine wave
d[n] being the discrete delta function
What I have so far is my sampled sinewave described in the following code:
Ts = 1.6e-3;% sample time
Fs = 1600; % sample rate
t = linspace(-3, 14, Fs); % time
uu = 1*(t >= 1);% unit step
w = 2*pi*187; % omega
xx = 0.187*sin(w*t);% x(t) = 0.187sin(w*t)
xxuu = xx .* uu; % multiplying step function with sine wavestem(t, xxuu)% stem plot
If possible, I would appreciate any comments made on the code as they would help me understand what exactly is going on. Any help is deeply appreciated.
댓글 수: 0
답변 (0개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!