亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? filter_settling_data.m

?? 我認為很不錯的語音處理的matlab源代碼
?? M
字號:
function [y2, num_settle_pts, settling_time]=filter_settling_data(Fs, y, settling_time)
% % filter_settling_data: Creates data to preappend to a time record for settling a filter
% %
% % Syntax:
% %
% % [y2, num_settle_pts]=filter_settling_data(Fs, y, settling_time);
% %
% % **********************************************************************
% %
% % Description
% %
% % [y2, num_settle_pts]=filter_settling_data(Fs, y, settling_time);
% % Returns y2 a set of data for settling a filter having num_settle_pts of
% % data points.  Fs (Hz) is the sampling rate, y is the time record, and
% % settling_time (s)is the time require for the impulse response of the
% % filter to decay to the desired amount.
% %
% % The filter settling data is the reflection of the data about the first
% % data point.  The settling data is phase matched to the original data
% % and smoothed to remove transient effects.  A sinusoidal input will
% % produce a pure sinusoid with continuous phase when the the filter
% % settling data is preappended to the original signal.
% %
% %
% %
% % ***********************************************************
% %
% % Input Variables
% %
% % Fs is the sampling rate in Hz.  default is 50000 Hz.
% %
% % y is the multichannel input time record in (Pa).  Processsing assumes
% %      that y has more channels than time record samples.
% %      y=randn(10000, 10) is the default.
% %
% % settling_time is the time it takes the filter to settle (seconds).
% %      default is settling_time=0.1;
% %
% % ***********************************************************
% %
% % Output Variables
% %
% % y2 is the filter settling data
% %
% % num_settle_pts is the number of data points in the settling data.
% %
% % **********************************************************************
%
%
% % These examples show the need for using the settling data especially
% % when using the filter command.
%
%
% Example='1';
% % A sinusoid is processed and the change from the filter settling data to
% % the actual signal is almost perfectly continuous.
%
% f_sig=20;
% Fs=50000;
% t_SP=(0:(1/Fs):(100/f_sig));
% y=sin(2*pi*t_SP*f_sig);
% settling_time=0.1;
% [y2, num_pts_se]=filter_settling_data(Fs, y, settling_time);
% buf=[y2 y];
% buf2=hilbert(buf);
% t_SP=1/Fs*(1:length(buf));
% subplot(3,1,1); plot(t_SP, buf); ylabel('signal (Pa)');
% hold on;
% subplot(3,1,2); plot(t_SP, abs(buf2)); ylabel('Amplitude (Pa)');
% subplot(3,1,3); plot(t_SP, 180/pi*angle(buf2)); ylabel('Phase deg.');
%
%
% Example='2';
% The lack of settling the filter causes the beginning of the filtered time
% record to oscillate with a very high amplitude.
%
% load Example_Data
% t=1/Fs*(1:length(SP));
% settling_time=0.1;
%
% [y2, num_pts_se]=filter_settling_data(Fs, SP, settling_time);
%
% % Now apply a 1/3 octave band filter
% Fc=100;
% N=3;
% n=3;
%
% [Bc, Ac]=Nth_octdsgn(Fs, Fc, N, n);
% SP2 = filter(Bc, Ac, [y2 SP]);
% SP2=SP2((num_pts_se+1):end);
% SP22 = filtfilt(Bc, Ac, [y2 SP]);
% SP22=SP22((num_pts_se+1):end);
%
% SP1 = filter(Bc, Ac, [SP]);
% SP11 = filtfilt(Bc, Ac, [SP]);
% plot(t, SP2, 'k');
% hold on;
% plot(t, 0.05+SP22, 'b');
% plot(t, 0.1+SP1, 'r');
% plot(t, 0.15+SP11, 'c');
% legend('"filter" With Filter settling', '"filtfilt" With Filter settling', '"filter" No Filter Settling',  '"filtfilt" No Filter Settling');
%
%
% Example='3';
%
% % Only the first data point using the resample program is problematic,
% % however this discontinuity can cause problems with additional signal
% % processing.
%
% load Example_Data
% [y2, num_pts_se]=filter_settling_data(Fs, SP, settling_time);
% SP2=resample([y2 SP], 1, 8);
% SP2=SP2((floor(num_pts_se/8)+1):end);
% SP1=resample(SP, 1, 8);
% plot(SP2, 'k');
% hold on;
% plot(SP1, 'r');
% legend('With Filter settling', 'No Filter Settling');
%
%
%
%
% % ***********************************************************
% %
% %
% % List of Dependent Subprograms for
% % filter_settling_data
% %
% %
% % Program Name   Author   FEX ID#
% % 1) convert_double
% % 2) estimatenoise		John D'Errico		16683
% % 3) wsmooth		Damien Garcia
% %
% % **********************************************************************
% %
% % Program was written by Edward L. Zechmann
% %
% %      date 6 December    2008
% %
% % modified  8 December    2008    Added Comments and an example.
% %
% % modified 17 December    2008    Added descriptions of the subprograms,
% %                                 input variables, and output variables.
% %
% % **********************************************************************
% %
% % Please feel free to modify this code.
% %
% % See Also: filter, filtfilt, resample, ACweight_time_filter,
% %           hand_arm_time_fil, whole_body_time_filter


if (nargin < 1 || isempty(Fs)) || ~isnumeric(Fs)
    Fs=50000;
end

if (nargin < 2 || isempty(y)) || ~isnumeric(y)
    y=rand(1, 50000);
end

% Make the data have the correct data type and size
[y]=convert_double(y);

[m1,n1]=size(y);
flag1=0;

if m1 > n1
    y=y';
    [m1, n1]=size(y);
    flag1=1;
end


if (nargin < 3 || isempty(settling_time)) || ~isnumeric(settling_time)
    settling_time=0.1;
end



% calculate the number of data points needed to settle the filter
num_settle_pts=ceil(Fs*settling_time);


if num_settle_pts < 1 && logical(n1 > 1)

    y2=[];
    num_settle_pts=0;

else

    % initialize the output matrix
    %y2=zeros(m1, num_settle_pts);

    % Calculate the time array
    t=1/Fs*(0:(num_settle_pts-1));

    % Match the amplitude of the signal to the amplitude of a sinusoid.
    A=sqrt(2)*sqrt(sum(y.^2, 2))./sqrt(n1);
    A(A==0)=1;
    y0=y(:,1);

    % Calculate the initial slope
    grad_pts=min([ n1, num_settle_pts]);
    bb=gradient(y(:, 1:grad_pts))*Fs;
    sl=bb(:, 1);
    max_sl=max(abs(bb),[], 2);
    
    % Calculate the signal frequency to be one-hundreth of the sampling rate
    Fsig=max([1/settling_time, sl'./(2*pi)]);
    Fsig_max=max(max_sl./2*pi);

    if Fsig_max > Fs/20

        % initialize the output matrix
        y2=zeros(m1, num_settle_pts);

        % Calculate the number of iterations needed to splice the settling time
        % data together.
        num_iter=ceil(num_settle_pts./n1);

        if num_iter < 1
            num_iter=1;
        end

        max_pts=min([num_settle_pts, n1]);

        w=hann(num_settle_pts);

        for e1=1:m1;

            y1=y(e1, 1:max_pts);

            for e2=1:num_iter;

                num_last_pts=num_settle_pts-(num_iter-1)*max_pts;

                if  isequal(e2, num_iter);
                    nn=num_last_pts;
                else
                    nn=max_pts;
                end


                if isequal(mod(e2, 2), 1)
                    y2(e1, (e2-1)*max_pts+(1:nn))=y1(1:nn);
                else
                    y2(e1, (e2-1)*max_pts+(1:nn))=fliplr(y1((max_pts-nn+1):max_pts));
                end

            end

            y2(e1, :) = w'.*wsmooth(y2(e1, :), 3);

        end

        y2=fliplr(y2);

    else
        
        % Calculate the offet normalized slope
        B=2*pi*Fsig;
        norm_sl=sl./A./B;

        % If the normalized slope is too steep the phase cannot be matched exactly
        norm_sl(norm_sl > 1)=0.99;
        norm_sl(norm_sl < -1)=-0.99;

        % Offset phase angle
        ph0=acos(norm_sl);

        % Calculate the intial phase angle to match the slope at the
        % last point to the actual slope with teh normalized slope being
        % in the range of -1 < norm_sl < 1
        ph=ph0-B.*t((num_settle_pts-1));

        y2=A.*sin(B*t+ph);

        % Shift sinusoid vertically to match y(o) constraint exactly
        y2=y2-y2(:, end)+y0;
    end

end



% Make sure the array has the same orientation as before
% transpose if necessary.
if isequal(flag1, 1)
    y2=y2';
end


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精彩视频在线观看| 久久久精品免费网站| ㊣最新国产の精品bt伙计久久| 久久国产三级精品| 日韩午夜激情电影| 亚洲欧美在线观看| 91福利国产成人精品照片| 成人免费一区二区三区在线观看| 成人av电影在线观看| 中文字幕中文字幕一区二区| 99精品黄色片免费大全| 激情欧美一区二区| 国模一区二区三区白浆| 2024国产精品视频| 不卡视频在线看| 亚洲视频一区二区在线| 91蝌蚪国产九色| 奇米在线7777在线精品| 欧美日韩综合不卡| 免费一级片91| 国产偷国产偷亚洲高清人白洁| 国产精品一区二区视频| 亚洲人成人一区二区在线观看| 91麻豆精品在线观看| 国产精品视频在线看| 激情文学综合丁香| 美女脱光内衣内裤视频久久影院| 午夜精品久久久久久久久| 视频在线观看一区| 欧美一区二区三区在线电影 | 午夜成人免费电影| 8x8x8国产精品| 94-欧美-setu| 成人三级伦理片| 麻豆一区二区在线| 亚洲成va人在线观看| 亚洲美女免费在线| 综合在线观看色| 国产性色一区二区| 国产日韩视频一区二区三区| 亚洲丝袜自拍清纯另类| 久久国产福利国产秒拍| 婷婷亚洲久悠悠色悠在线播放| 亚洲国产经典视频| 26uuu精品一区二区三区四区在线| 日韩美一区二区三区| 欧美日韩一区久久| 91视频免费播放| 91官网在线观看| 色婷婷精品久久二区二区蜜臀av| 成人在线视频一区| 91一区二区三区在线观看| 成人激情开心网| 麻豆91精品91久久久的内涵| 久久99热狠狠色一区二区| 青青青伊人色综合久久| 麻豆91免费看| 久久爱另类一区二区小说| 欧美bbbbb| 黑人巨大精品欧美一区| 激情五月婷婷综合| 久久av资源站| 国产成人av电影在线观看| 国产精品综合网| 北条麻妃国产九九精品视频| 成人高清在线视频| 99久久精品国产网站| 欧美午夜片在线看| 7777精品伊人久久久大香线蕉的| 777午夜精品视频在线播放| 精品sm在线观看| 国产女人18水真多18精品一级做| 日韩欧美专区在线| 国产精品人人做人人爽人人添| 日本一区二区三区免费乱视频| 久久这里只有精品视频网| 国产精品国产三级国产有无不卡| 亚洲色图视频网站| 在线视频欧美区| 国产成人aaa| 97国产一区二区| 色先锋资源久久综合| 日韩一二三区不卡| 久久一二三国产| 一区在线播放视频| 午夜久久久影院| 狠狠色丁香婷婷综合久久片| 91色综合久久久久婷婷| 欧美精品日韩一区| 久久久国产精华| 有码一区二区三区| 久久99精品久久久久久| 91污片在线观看| 色哟哟一区二区在线观看| 91精品国产欧美一区二区| 国产校园另类小说区| 天天综合网 天天综合色| 国产一区欧美二区| av电影天堂一区二区在线| 日韩一区二区三区免费观看 | 在线免费观看日本欧美| 精品日韩99亚洲| 国产精品白丝在线| 亚欧色一区w666天堂| 久久av资源站| 色综合久久中文综合久久牛| 久久精品一区八戒影视| 亚洲一区在线观看视频| 精品一区二区影视| 欧美卡1卡2卡| 中文字幕亚洲成人| 琪琪久久久久日韩精品| 色哟哟精品一区| 99免费精品在线| 精品一二线国产| 欧美主播一区二区三区| 国产亚洲制服色| 久久99久久精品| 欧美最新大片在线看| 欧美久久一二三四区| 亚洲免费在线观看视频| 国产原创一区二区三区| 在线播放日韩导航| 日韩一区在线播放| 狠狠色丁香久久婷婷综合丁香| 欧美一级专区免费大片| 国产精品久久久久aaaa樱花| 激情综合网天天干| 日韩精品一区二区三区在线播放 | 日本一区免费视频| 美女视频黄a大片欧美| 欧美在线制服丝袜| 亚洲精品日韩一| 丁香桃色午夜亚洲一区二区三区| 在线看国产日韩| 亚洲嫩草精品久久| 成人一区在线看| 国产精品欧美一区二区三区| 韩国精品久久久| 欧美成人精品二区三区99精品| 老司机免费视频一区二区三区| 欧美影片第一页| 自拍偷拍亚洲综合| 一本大道av一区二区在线播放| 国产精品青草久久| 99久久99久久精品国产片果冻 | 国精产品一区一区三区mba桃花 | 久久99精品久久久久久久久久久久| 欧美视频精品在线| 亚洲免费在线观看| 91免费小视频| 亚洲免费观看高清完整版在线观看 | 99精品视频一区二区| 国产精品热久久久久夜色精品三区 | 中文天堂在线一区| 波多野结衣亚洲一区| 国产欧美日产一区| 久久91精品国产91久久小草| 国产日韩影视精品| 国产 欧美在线| 成人欧美一区二区三区在线播放| 成人一区二区三区| 中文字幕制服丝袜成人av| 91丨porny丨户外露出| 亚洲欧美日韩系列| av午夜精品一区二区三区| 一区二区三区精品视频在线| 欧美自拍丝袜亚洲| 免费观看在线色综合| 欧美一级黄色片| 激情五月婷婷综合| 亚洲三级免费观看| 在线精品国精品国产尤物884a | 久久99精品视频| 国产精品久久看| 欧美日韩激情一区二区三区| 日本欧美一区二区在线观看| 精品伦理精品一区| 91精品国产一区二区三区蜜臀| 三级精品在线观看| 日韩女同互慰一区二区| 国产91精品露脸国语对白| 国产精品久久久久永久免费观看| 99久久精品国产观看| 免费一级片91| 中文字幕欧美国产| 欧美日韩久久一区二区| 日韩和欧美一区二区| 国产精品久久久久久久久免费相片| 色综合久久久久网| 亚洲欧美电影一区二区| 日韩欧美激情四射| av激情综合网| 秋霞影院一区二区| 中文字幕欧美日韩一区| zzijzzij亚洲日本少妇熟睡| 同产精品九九九| 国产精品每日更新在线播放网址| 制服.丝袜.亚洲.中文.综合| 成人性色生活片免费看爆迷你毛片|