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

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

?? my_fft.m

?? Fast Fourier Transmission in Matlab
?? M
字號:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% by erinch
% of course this is not the best fft function written, but this function
% one of the best open source fft algorithm.
% the aim of this code is to explain how Discrite Fourier Transform (DFT)
% can be found by using Fast Fourier Transform (FFT) for 2^m number of bits
% using radix2
%
% DFT is used to find the frequencies used in a signal, if there are 
% more than one signal then DFT finds every frequencies in the input signal
% in the result its first value is the DC value of the signal.
% other outputs are frequency harmonics
% 
% -------------------------------------------------------------------------
% Ex: sampling frequency(fs)=50Hz
% output's 1st value is DC value of the signal
% output's 2nd value is 50Hz
% output's 3rd value is 100Hz
% output's 4th value is 150Hz
% .           .           .   
% .           .           .
% .           .           .
% .           .           .
% goes on...
% -------------------------------------------------------------------------
% FFT is used to find DFT faster, and is faster if you try to find most
% frequencies. 
% radix2 is an algorithm used in FFT, which takes values as a power of 2
% ex: at first it add 2 values, then add 4 values, then 8 values etc
% -------------------------------------------------------------------------
% 
% function can take two argument as input
% x=my_fft(y,m)
% m is the number of bits, which is used to take 2^m points from the signal
% if you give more than maximum possible bit or if you do not enter it then
% algorithm takes the maximum possible value for m. if you do not sure what
% to enter for m leave it. 
% -nargin is used to understand how many arguments you enter for 
% the function, it gives us an usage without entering some or/and all input
% arguments for the functions-
% y is our input signal, which we want to find DFT. it can be any signal
% if you just want to test the function you can leave it, in this condition
% input signal is taken as y = sin(2*pi*50*t)+sin(2*pi*120*t) as sample
% 
% reversed order must be used either at the beginning for the input 
% X(n) values or at the end for result Y(n) values. it is the first rule in
% FFT. i use at the beginning.
% a built-in function digitrevorder(numbers_in_decimal,base) is does this 
% work for us.
% then input X(n) values are copied in reversed order
% 
% 
% then we start multiplying and summation procedure
% we can say that state holds our addition number
% in each state it sums 2,4,8,16,32,...etc number of results as 2^m 
% summation in each state,which is come from multiplying
% 
% in each multiplying step it multiplies X(n) values with the coefficients
% called W(kn), which are calculated in each state. because number of W(kn)
% changes in each state and has different values. W(kN)=exp(-j*2*pi*k/N)
% 
% and also the algorithm has different number of summation or subtraction
% in different order in each state which are calculated in for loops
% called plus and minus. they are used in while loop because of their order
% and number
% 
% and finally at end of each state it equalize the results as new inputs
% 
% after the states finished the last output gives us DFT result of 
% the signal
% of course this includes complex values and maybe this values are nothing 
% for you. do not worry. all you need to take their absolute values and
% then to plot them.
% Ex:
% x=my_fft(y,m);
% x=abs(x);
% plot(x);
% bar(x);
% plotting with bar will give better result to understand FFT
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function x=my_fft(y,m)
% y is the signal which you want to take FFT
% m is the number of bits

%% initializing
% you can call the function without entering a signal or number of points
% because there is default values for y and m which are;
% y = sin(2*pi*50*t)+sin(2*pi*120*t);
% m=3;

if nargin==0
    % initializing
    % test for 8 points
    m=3;
    % test signal y = sin(2*pi*50*t)+sin(2*pi*120*t);
    t=1:.1:50;
    y = sin(2*pi*50*t)+sin(2*pi*120*t);
end

% controlling m bit length
% if m given more than the bits in signal than m equalizing to maximum
% possible value
if nargin ==1 | length(y)>2^m
    m=log2(length(y));
    m=floor(m);
end

% creating 2^m points from signal
y=y(1:2^m);
%     -----------------------------------------------------------------


%% reversed order
% making a decimal order from bit reversed order
% m = # of bits
decimal_order=0:(2^m)-1;
reversed_order=digitrevorder(decimal_order, 2);

%% copying the signal points
% copying original signal y to x in reversed bit order
for index=1:2^m
    x(index)=y(reversed_order(index)+1);
end
% reversed_order(index)+1 is because the matrix must be start from index of
% 1 not 0


%% algorithm

for state=1:m       % state is the each multiplying step
    %     in each state we combine 2,4,8,16 ...etc pt. of DFT
    
    %     -----------------------------------------------------------------
    %     creating W for each step
    %     there are (2^(state-1)) different W for each state
    for kN=1:2^(state-1)
        N=2^state;
        k=kN-1;                 
        % in real equation actually k=kn 
        % but in matlab kn can not be 'zero' because of the matrix index 
        W(kN)=exp(-j*2*pi*k/N);
    end     % end of W
    %     -----------------------------------------------------------------
    
    %     -----------------------------------------------------------------
    %     initializing variables
    index=1;        % index counter of the equation number
    diff=2^(state-1);
    kN=1;           % index counter of the W
    %     multiplying coefficients 
    
    while (index <= (2^m))                         % there are 2^m equation
        % i use "while" instead of "for" loop because i decide the number
        % of addition or subtraction by "for loop" inside and if i did not
        % use "while" it cause index exceed or index cancellation in matrix
        
        for plus=1:2^(state-1)                      
            % plus is the number of addition in a sequance
            % in every state the order changes 
            % (like one addition,2 addition,4 addition ...etc.)
            U(index)=x(index)+W(kN)*x(index+diff);
            index=index+1;
            % i have to increase index value becasue i use "while"
            if kN < 2^(state-1)
                kN=kN+1;
            else
                kN=1;
            end     % end of "if statement" of 'kN' index
            % i have to check the value of 'kN' because in every step there
            % are 2^(state-1) number of W and in every equation it changes
            % whether additon or subtraction, so i have to also increase
            % the index of array of 'W'
        end     % end of "for loop" of equations for additon
       
        for minus=1:2^(state-1)
            % minus is the number of subtraction in a sequance
            % in every state the order changes 
            % (like 1 subtraction,2 subtraction,4 subtraction ...etc.)
            U(index)=x(index-diff)-W(kN)*x(index);
            index=index+1;
            % i have to increase indes value becasue i use "while"
            if kN < 2^(state-1)
                kN=kN+1;
            else
                kN=1;
            end     % end of "if statement" of 'kN' index
        end     % end of "for loop" of equations for subtraction
        
    end         % end of "while" --- equation index
    %     -----------------------------------------------------------------
    
    %     passing the multiplier U() to x(), because i use matrix of x
    %     inside the "while" to represent former values
    for index=1:2^m
        x(index)=U(index);
    end         % end of "for loop" -- copying array to pass next state

end             % end of "for loop" of state value
%     ---------------------------------------------------------------------

x;
% x is the DFT of the signal y for the number of 2^m points

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美色精品在线视频| av中文字幕一区| 国产精品美女久久久久久久网站| 欧美三级日韩三级| 高清不卡一二三区| 日韩1区2区日韩1区2区| 亚洲激情在线激情| 久久久久久久久蜜桃| 欧美一级艳片视频免费观看| k8久久久一区二区三区 | 国产高清亚洲一区| 亚洲精品免费在线播放| 国产精品久久久久久久久快鸭| 26uuu精品一区二区三区四区在线 26uuu精品一区二区在线观看 | 久久久99免费| 精品久久久久久久人人人人传媒| 4438x成人网最大色成网站| 国产福利一区在线观看| 国产在线播放一区| 国产精品一区二区在线播放 | 国精产品一区一区三区mba桃花| 日韩精品亚洲一区| 日本aⅴ精品一区二区三区| 午夜婷婷国产麻豆精品| 五月天一区二区| 午夜视频在线观看一区二区三区| 一级做a爱片久久| 亚洲国产综合91精品麻豆| 亚洲高清久久久| 爽好久久久欧美精品| 美女视频黄a大片欧美| 精品一区二区久久久| 国产成人99久久亚洲综合精品| 国产成人精品一区二区三区网站观看| 国产毛片精品视频| 国产99精品国产| 色偷偷久久人人79超碰人人澡| 在线区一区二视频| 欧美一区二区三区视频免费播放| 国产大陆精品国产| 自拍偷拍国产亚洲| 中文字幕综合网| 精品一区二区在线视频| 在线欧美小视频| 717成人午夜免费福利电影| 91同城在线观看| 在线不卡一区二区| 久久久久国产一区二区三区四区| 亚洲欧洲av在线| 日韩中文欧美在线| 粉嫩一区二区三区性色av| 一本色道久久综合狠狠躁的推荐 | 欧美在线影院一区二区| 色天使色偷偷av一区二区| 3d动漫精品啪啪| 欧美国产日韩亚洲一区| 午夜一区二区三区在线观看| 韩日av一区二区| 成人性生交大片免费看中文| 欧美日韩国产综合草草| 日本一区二区三区免费乱视频| 一区二区三区中文在线| 国产精品亚洲第一区在线暖暖韩国| 99re热这里只有精品免费视频| 欧美一区二区三区免费大片| 日韩码欧中文字| 国产综合色精品一区二区三区| 欧洲精品在线观看| 亚洲精品一区二区三区影院| 一区二区三区四区蜜桃 | 国产精品二三区| 国产一区二区调教| 7777精品伊人久久久大香线蕉的 | 成人三级伦理片| 成人一级视频在线观看| 色综合久久久久久久久| 欧美韩国日本一区| 麻豆91精品视频| 欧美日本一区二区在线观看| 亚洲美女免费在线| 成人高清视频在线| 久久综合色之久久综合| 蜜桃视频第一区免费观看| 欧美三级视频在线观看| 成人欧美一区二区三区黑人麻豆| 国产一区二区精品久久| 日韩美一区二区三区| 日韩国产精品久久| 777xxx欧美| 亚洲精品久久久久久国产精华液| 高清不卡一区二区| 中文一区二区完整视频在线观看| 国产乱码精品1区2区3区| 在线播放91灌醉迷j高跟美女 | 欧美日韩一区二区在线观看| 17c精品麻豆一区二区免费| 奇米影视一区二区三区小说| 5858s免费视频成人| 肉肉av福利一精品导航| 欧美一级一级性生活免费录像| 久久99精品久久久久婷婷| 久久精品日产第一区二区三区高清版 | 91麻豆精品国产91久久久使用方法| 日本亚洲一区二区| 国产精品二三区| 日韩一级高清毛片| av中文字幕一区| 美女诱惑一区二区| 中文字幕一区在线观看视频| 欧美日韩国产美| 国产精品99久久久| 亚洲午夜在线视频| 久久亚洲综合色| 欧美剧情片在线观看| 成人免费看的视频| 三级久久三级久久| 亚洲人一二三区| 久久久91精品国产一区二区三区| 欧美系列日韩一区| 成人黄色av电影| 精品在线免费视频| 亚洲一区欧美一区| 中文av一区特黄| 精品对白一区国产伦| 欧美最猛性xxxxx直播| 国产黄人亚洲片| 紧缚奴在线一区二区三区| 中文字幕亚洲一区二区va在线| 精品日韩一区二区| 欧美性生活一区| 91首页免费视频| 成人avav在线| 国产91高潮流白浆在线麻豆 | 懂色av中文字幕一区二区三区| 亚洲成av人片一区二区三区| 136国产福利精品导航| 国产性天天综合网| 久久综合国产精品| 日韩精品一区二区三区四区| 精品视频在线视频| 欧美做爰猛烈大尺度电影无法无天| 国产高清在线精品| 国产成人精品亚洲午夜麻豆| 极品美女销魂一区二区三区免费| 免费看黄色91| 美腿丝袜一区二区三区| 久久国产精品99精品国产| 免费在线看成人av| 免费观看成人av| 久久精品国产99久久6| 久久99九九99精品| 国产在线观看一区二区| 精品一区二区三区久久久| 欧美a级理论片| 激情小说亚洲一区| 国产成人在线电影| 丁香婷婷综合五月| 99天天综合性| 99re在线精品| 欧美日韩精品欧美日韩精品| 欧美系列一区二区| 欧美一级专区免费大片| 精品国产乱码久久久久久免费| 精品国产99国产精品| 国产欧美日产一区| 亚洲男女一区二区三区| 五月婷婷久久综合| 国产原创一区二区| 91在线国内视频| 精品视频资源站| 久久影院视频免费| 中文字幕亚洲综合久久菠萝蜜| 一区二区三区高清不卡| 日韩在线卡一卡二| 国产成人av一区| 欧美视频中文字幕| 亚洲精品一区在线观看| 亚洲欧美激情小说另类| 人人精品人人爱| 成人黄色免费短视频| 欧美精品在线一区二区| 久久精品在线免费观看| 亚洲综合成人在线| 精品综合久久久久久8888| av在线不卡电影| 欧美一级黄色大片| 日韩一区有码在线| 美女一区二区三区在线观看| 成人av第一页| 精品免费国产一区二区三区四区| 亚洲三级久久久| 韩国三级中文字幕hd久久精品| 色综合色狠狠综合色| 亚洲精品在线网站| 亚洲成av人片一区二区三区| 成人短视频下载| 日韩精品最新网址| 亚洲一区中文在线| av成人动漫在线观看| 亚洲精品一区二区三区蜜桃下载|