can someone show me how todo this. I\'m using Matlab 39. The following MATLAB co
ID: 2081700 • Letter: C
Question
can someone show me how todo this. I'm using Matlab
Explanation / Answer
clc;
close all;
clear all;
t = 0:0.05:10;
y = sin(t) -0.1 + 0.2*rand(1,length(t));
%CODE to generate smoothened signal
smooth_y(1) = y(1);
smooth_y(length(t)) = y(length(t));
for i = 2:1:length(t)-1;
smooth_y(i) = (y(i-1) + y(i) + y(i+1))/3;
end
figure
subplot(2,1,1);
stem(t,y);
subplot(2,1,2);
stem(t,smooth_y);
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.