91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 2KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-28
  • 語言: Matlab
  • 標簽:

資源簡介

matlab開發-信號平滑移動平均濾波器。matlab程序演示信號平滑或信號平均的概念

資源截圖

代碼片段和文件信息

%?Matlab?Program?to?demonstrate?the?concpet?of?“Signal?Smoothing“?
%?Signal?Smoothing?or?Averaging?is?the?Fundamental?Noise?Reduction?Tool?in
%?1-D?Signal?Processing?Such?as?a?Monotonic?Signal?Speech?or?Voice.
clc;
clear?all;
close?all;
%?Initialise?the?Time?
t?=?0:0.001:1;???%?0?--?Starting?Time?0.001--?Sampling?Time?1?--?Ending?Time
%?reading?the?size?of?the?time
[mn]?=?size(t);
%?Generation?of?sine?wave
%?amplitude
a?=?2;
%?frequency
f?=?4;
%?sine?wave?argument?according?to?the?definition
y?=?a*sin(2*pi*f*t);
%?Generation?of?Random?signal?using?“rand“?command?in?the?matlab?
%?Please?see?the?sintax?of?“rand“?command?by?typing?help?rand?in?the?matlab
%?command?window
r?=?rand(mn);
%?Note:?Observer?that?we?generated?the?random?signal?in?the?matlab?using
%?rand?function?such?that?size?of?the?signal?and?random?signal?both?are
%?similar.?
%?Adding?both?signal?and?noise
y1?=?(y?+?r);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%Implementation?of?Moving?Average?Filter?or?Smoothing?Filter%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?Algorithm:
%???????????????X(n-1)?+?X(n)?+?X(n+1)
%????Y(n)?=?????----------------------???
%?????????????????????????3
%???????????????
%??????????????here?X(n)?=?noise?effected?signal
%????????????????????Y(n)?=?Smoothed?or?averaged?signal
%?therefore
%?Let‘s?Initiliaze?the?for?loop?from?2:n-1?in?order?to?validate?the?real
%?meaning?of?(n-1)?and?(n+1)
%?let?the?ouput?smoothed?signal?is?y2(n)
%?Let‘s?create?an?empty?array?y2(n)?size?equal?to?the?size?of?the?input
%?signal
y2?=?zeros(mn);

for?i?=?2:(n-1)
????y2(i)?=?(y1(i-1)?+?y1(i)?+?y1(i+1))/3;
end

%?therefore?y2(i)?will?be?the?smoothed?signal
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?Lets?plot?the?signals?and?see?the?output

subplot(411);
plot(ty);?title(‘input?signal‘);
subplot(412);
plot(tr);?title(‘random?signal‘);
subplot(413);
plot(ty1);?title(‘noise?added?signal‘);
subplot(414);
plot(ty2);?title(‘smoothed?signal‘);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?Please?try?this?implementation?an?extension
%?initiate?a?for?loop?for?2-4?times?and?make?y2?=?y1?i.e.?we?are?making
%?a?feed?back?it?becomes?a?recursive?filter?this?will?be?the?first?step
%?towards?the?implementation?of?Recursive?filter
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%?For?any?questions?please?send?a?mail?to?samudrala.naren@gmail.com
%?Implemented?by?:?Jagadeesh?Samudrala?Asst.?Prof.?Dept.?of?ECE?Aditya
%?Engineering?College.?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????2779??2015-09-26?04:10??signal_smoothing.m
?????文件????????1549??2015-09-26?04:10??license.txt

評論

共有 條評論