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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? st.m

?? S變換是較新的時頻分析工具
?? M
字號:
 
function [st,t,f] = st(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate)
% Returns the Stockwell Transform of the timeseries.
% Code by Robert Glenn Stockwell.
% DO NOT DISTRIBUTE
% BETA TEST ONLY
% Reference is "Localization of the Complex Spectrum: The S Transform"
% from IEEE Transactions on Signal Processing, vol. 44., number 4, April 1996, pages 998-1001.
%
%-------Inputs Needed------------------------------------------------
%  
%   *****All frequencies in (cycles/(time unit))!******
%	"timeseries" - vector of data to be transformed
%-------Optional Inputs ------------------------------------------------
%
%"minfreq" is the minimum frequency in the ST result(Default=0)
%"maxfreq" is the maximum frequency in the ST result (Default=Nyquist)
%"samplingrate" is the time interval between samples (Default=1)
%"freqsamplingrate" is the frequency-sampling interval you desire in the ST result (Default=1)
%Passing a negative number will give the default ex.  [s,t,f] = st(data,-1,-1,2,2)
%-------Outputs Returned------------------------------------------------
%
% st     -a complex matrix containing the Stockwell transform. 
%			 The rows of STOutput are the frequencies and the 
%         columns are the time values ie each column is 
%         the "local spectrum" for that point in time
%  t      - a vector containing the sampled times
%  f      - a vector containing the sampled frequencies
%--------Additional details-----------------------
%   %  There are several parameters immediately below that
%  the user may change. They are:
%[verbose]    if true prints out informational messages throughout the function.
%[removeedge] if true, removes a least squares fit parabola
%                and puts a 5% hanning taper on the edges of the time series.
%                This is usually a good idea.
%[analytic_signal]  if the timeseries is real-valued
%                      this takes the analytic signal and STs it.
%                      This is almost always a good idea.
%[factor]     the width factor of the localizing gaussian
%                ie, a sinusoid of period 10 seconds has a 
%                gaussian window of width factor*10 seconds.
%                I usually use factor=1, but sometimes factor = 3
%                to get better frequency resolution.
%   Copyright (c) by Bob Stockwell
%   $Revision: 1.2 $  $Date: 1997/07/08  $


% This is the S transform wrapper that holds default values for the function.
TRUE = 1;
FALSE = 0;
%%% DEFAULT PARAMETERS  [change these for your particular application]
verbose = TRUE;          
removeedge= FALSE;
analytic_signal =  FALSE;
factor = 1;
%%% END of DEFAULT PARAMETERS


%%%START OF INPUT VARIABLE CHECK
% First:  make sure it is a valid time_series 
%         If not, return the help message

if verbose disp(' '),end  % i like a line left blank

if nargin == 0 
   if verbose disp('No parameters inputted.'),end
   st_help
   t=0;,st=-1;,f=0;
   return
end

% Change to column vector
if size(timeseries,2) > size(timeseries,1)
	timeseries=timeseries';	
end

% Make sure it is a 1-dimensional array
if size(timeseries,2) > 1
   error('Please enter a *vector* of data, not matrix')
	return
elseif (size(timeseries)==[1 1]) == 1
	error('Please enter a *vector* of data, not a scalar')
	return
end

% use defaults for input variables

if nargin == 1
   minfreq = 0;
   maxfreq = fix(length(timeseries)/2);
   samplingrate=1;
   freqsamplingrate=1;
elseif nargin==2
   maxfreq = fix(length(timeseries)/2);
   samplingrate=1;
   freqsamplingrate=1;
   [ minfreq,maxfreq,samplingrate,freqsamplingrate] =  check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries);
elseif nargin==3 
   samplingrate=1;
   freqsamplingrate=1;
   [ minfreq,maxfreq,samplingrate,freqsamplingrate] =  check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries);
elseif nargin==4   
   freqsamplingrate=1;
   [ minfreq,maxfreq,samplingrate,freqsamplingrate] =  check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries);
elseif nargin == 5
      [ minfreq,maxfreq,samplingrate,freqsamplingrate] =  check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries);
else      
   if verbose disp('Error in input arguments: using defaults'),end
   minfreq = 0;
   maxfreq = fix(length(timeseries)/2);
   samplingrate=1;
   freqsamplingrate=1;
end
if verbose 
   disp(sprintf('Minfreq = %d',minfreq))
   disp(sprintf('Maxfreq = %d',maxfreq))
   disp(sprintf('Sampling Rate (time   domain) = %d',samplingrate))
   disp(sprintf('Sampling Rate (freq.  domain) = %d',freqsamplingrate))
   disp(sprintf('The length of the timeseries is %d points',length(timeseries)))

   disp(' ')
end
%END OF INPUT VARIABLE CHECK

% If you want to "hardwire" minfreq & maxfreq & samplingrate & freqsamplingrate do it here

% calculate the sampled time and frequency values from the two sampling rates
t = (0:length(timeseries)-1)*samplingrate;
spe_nelements =ceil((maxfreq - minfreq+1)/freqsamplingrate)   ;
f = (minfreq + [0:spe_nelements-1]*freqsamplingrate)/(samplingrate*length(timeseries));
if verbose disp(sprintf('The number of frequency voices is %d',spe_nelements)),end


% The actual S Transform function is here:
st = strans(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,removeedge,analytic_signal,factor); 
% this function is below, thus nicely encapsulated

%WRITE switch statement on nargout
% if 0 then plot amplitude spectrum
if nargout==0 
   if verbose disp('Plotting pseudocolor image'),end
   pcolor(t,f,abs(st))
end


return


%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


function st = strans(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,removeedge,analytic_signal,factor); 
% Returns the Stockwell Transform, STOutput, of the time-series
% Code by R.G. Stockwell.
% Reference is "Localization of the Complex Spectrum: The S Transform"
% from IEEE Transactions on Signal Processing, vol. 44., number 4,
% April 1996, pages 998-1001.
%
%-------Inputs Returned------------------------------------------------
%         - are all taken care of in the wrapper function above
%
%-------Outputs Returned------------------------------------------------
%
%	ST    -a complex matrix containing the Stockwell transform.
%			 The rows of STOutput are the frequencies and the
%			 columns are the time values
%
%
%-----------------------------------------------------------------------

% Compute the length of the data.
n=length(timeseries);
original = timeseries;
if removeedge
    if verbose disp('Removing trend with polynomial fit'),end
 	 ind = [0:n-1]';
    r = polyfit(ind,timeseries,2);
    fit = polyval(r,ind) ;
	 timeseries = timeseries - fit;
    if verbose disp('Removing edges with 5% hanning taper'),end
    sh_len = floor(length(timeseries)/10);
    wn = hanning(sh_len);
    if(sh_len==0)
       sh_len=length(timeseries);
       wn = 1&[1:sh_len];
    end
    % make sure wn is a column vector, because timeseries is
   if size(wn,2) > size(wn,1)
      wn=wn';	
   end
   
   timeseries(1:floor(sh_len/2),1) = timeseries(1:floor(sh_len/2),1).*wn(1:floor(sh_len/2),1);
	timeseries(length(timeseries)-floor(sh_len/2):n,1) = timeseries(length(timeseries)-floor(sh_len/2):n,1).*wn(sh_len-floor(sh_len/2):sh_len,1);
  
end

% If vector is real, do the analytic signal 

if analytic_signal
   if verbose disp('Calculating analytic signal (using Hilbert transform)'),end
   % this version of the hilbert transform is different than hilbert.m
   %  This is correct!
   ts_spe = fft(real(timeseries));
   h = [1; 2*ones(fix((n-1)/2),1); ones(1-rem(n,2),1); zeros(fix((n-1)/2),1)];
   ts_spe(:) = ts_spe.*h(:);
   timeseries = ifft(ts_spe);
end  

% Compute FFT's
tic;vector_fft=fft(timeseries);tim_est=toc;
vector_fft=[vector_fft,vector_fft];
tim_est = tim_est*ceil((maxfreq - minfreq+1)/freqsamplingrate)   ;
if verbose disp(sprintf('Estimated time is %f',tim_est)),end

% Preallocate the STOutput matrix
st=zeros(ceil((maxfreq - minfreq+1)/freqsamplingrate),n);
% Compute the mean
% Compute S-transform value for 1 ... ceil(n/2+1)-1 frequency points
if verbose disp('Calculating S transform...'),end
if minfreq == 0
   st(1,:) = mean(timeseries)*(1&[1:1:n]);
else
  	st(1,:)=ifft(vector_fft(minfreq+1:minfreq+n).*g_window(n,minfreq,factor));
end

%the actual calculation of the ST
% Start loop to increment the frequency point
for banana=freqsamplingrate:freqsamplingrate:(maxfreq-minfreq)
   st(banana/freqsamplingrate+1,:)=ifft(vector_fft(minfreq+banana+1:minfreq+banana+n).*g_window(n,minfreq+banana,factor));
end   % a fruit loop!   aaaaa ha ha ha ha ha ha ha ha ha ha
% End loop to increment the frequency point
if verbose disp('Finished Calculation'),end

%%% end strans function

%------------------------------------------------------------------------
function gauss=g_window(length,freq,factor)

% Function to compute the Gaussion window for 
% function Stransform. g_window is used by function
% Stransform. Programmed by Eric Tittley
%
%-----Inputs Needed--------------------------
%
%	length-the length of the Gaussian window
%
%	freq-the frequency at which to evaluate
%		  the window.
%	factor- the window-width factor
%
%-----Outputs Returned--------------------------
%
%	gauss-The Gaussian window
%

vector(1,:)=[0:length-1];
vector(2,:)=[-length:-1];
vector=vector.^2;    
vector=vector*(-factor*2*pi^2/freq^2);
% Compute the Gaussion window
gauss=sum(exp(vector));

%-----------------------------------------------------------------------

%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%
function [ minfreq,maxfreq,samplingrate,freqsamplingrate] =  check_input(minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,timeseries)
% this checks numbers, and replaces them with defaults if invalid

% if the parameters are passed as an array, put them into the appropriate variables
s = size(minfreq);
l = max(s);
if l > 1  
   if verbose disp('Array of inputs accepted.'),end
   temp=minfreq;
   minfreq = temp(1);;
   if l > 1  maxfreq = temp(2);,end;
   if l > 2  samplingrate = temp(3);,end;
   if l > 3  freqsamplingrate = temp(4);,end;
   if l > 4  
      if verbose disp('Ignoring extra input parameters.'),end
   end;

end      
     
   if minfreq < 0 | minfreq > fix(length(timeseries)/2);
      minfreq = 0;
      if verbose disp('Minfreq < 0 or > Nyquist. Setting minfreq = 0.'),end
   end
   if maxfreq > length(timeseries)/2  | maxfreq < 0 
      maxfreq = fix(length(timeseries)/2);
      if verbose disp(sprintf('Maxfreq < 0 or > Nyquist. Setting maxfreq = %d',maxfreq)),end
   end
      if minfreq > maxfreq 
      temporary = minfreq;
      minfreq = maxfreq;
      maxfreq = temporary;
      clear temporary;
      if verbose disp('Swapping maxfreq <=> minfreq.'),end
   end
   if samplingrate <0
      samplingrate = abs(samplingrate);
      if verbose disp('Samplingrate <0. Setting samplingrate to its absolute value.'),end
   end
   if freqsamplingrate < 0   % check 'what if freqsamplingrate > maxfreq - minfreq' case
      freqsamplingrate = abs(freqsamplingrate);
      if verbose disp('Frequency Samplingrate negative, taking absolute value'),end
   end

% bloody odd how you don't end a function

%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%
function st_help
   disp(' ')
	disp('st()  HELP COMMAND')
	disp('st() returns  - 1 or an error message if it fails')
	disp('USAGE::    [localspectra,timevector,freqvector] = st(timeseries)')
  	disp('NOTE::   The function st() sets default parameters then calls the function strans()')
   disp(' ')  
   disp('You can call strans() directly and pass the following parameters')
   disp(' **** Warning!  These inputs are not checked if strans() is called directly!! ****')
  	disp('USAGE::  localspectra = strans(timeseries,minfreq,maxfreq,samplingrate,freqsamplingrate,verbose,removeedge,analytic_signal,factor) ')
     
   disp(' ')
   disp('Default parameters (available in st.m)')
	disp('VERBOSE          - prints out informational messages throughout the function.')
	disp('REMOVEEDGE       - removes the edge with a 5% taper, and takes')
   disp('FACTOR           -  the width factor of the localizing gaussian')
   disp('                    ie, a sinusoid of period 10 seconds has a ')
   disp('                    gaussian window of width factor*10 seconds.')
   disp('                    I usually use factor=1, but sometimes factor = 3')
   disp('                    to get better frequency resolution.')
   disp(' ')
   disp('Default input variables')
   disp('MINFREQ           - the lowest frequency in the ST result(Default=0)')
   disp('MAXFREQ           - the highest frequency in the ST result (Default=nyquist')
   disp('SAMPLINGRATE      - the time interval between successive data points (Default = 1)')
   disp('FREQSAMPLINGRATE  - the number of frequencies between samples in the ST results')
	
% end of st_help procedure   


?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久线在线观看| 色婷婷综合五月| 欧美一级二级在线观看| 青青草国产精品亚洲专区无| 精品一区二区av| 韩国av一区二区三区在线观看| 日韩一级欧美一级| 久久国产精品无码网站| 国产偷v国产偷v亚洲高清| 成人午夜看片网址| 一区二区三区在线免费视频| 欧美巨大另类极品videosbest| 秋霞国产午夜精品免费视频| 精品999在线播放| 成人av小说网| 亚洲h在线观看| 久久综合久久久久88| 99国内精品久久| 日韩中文字幕麻豆| 国产欧美日韩麻豆91| 色婷婷综合五月| 欧美aⅴ一区二区三区视频| 日本一区二区三区电影| 欧美自拍丝袜亚洲| 国产裸体歌舞团一区二区| 国产精品久久毛片| 91精品国产欧美日韩| 丰满岳乱妇一区二区三区| 亚洲午夜在线电影| 国产色产综合色产在线视频| 精品污污网站免费看| 国产麻豆成人传媒免费观看| 亚洲精品视频在线观看免费| 日韩精品一区二区三区中文不卡| 99久久伊人久久99| 精品一二线国产| 亚洲一卡二卡三卡四卡| 久久久99精品免费观看| 欧洲视频一区二区| 国产成人精品午夜视频免费| 香蕉加勒比综合久久| 国产精品网曝门| 日韩一区二区影院| 色妞www精品视频| 国产精一品亚洲二区在线视频| 亚洲小说欧美激情另类| 中文字幕亚洲区| 久久久久久影视| 日韩天堂在线观看| 欧美性欧美巨大黑白大战| 成人白浆超碰人人人人| 91国偷自产一区二区使用方法| 国产九色sp调教91| 免费欧美在线视频| 一区二区高清在线| 亚洲欧洲日韩av| 久久精品亚洲精品国产欧美kt∨| 5月丁香婷婷综合| 欧洲精品一区二区| www..com久久爱| 国产成人av在线影院| 久久国产精品区| 日韩av成人高清| 亚洲一二三专区| 亚洲黄色小说网站| 亚洲精品欧美激情| 亚洲精品五月天| 综合色天天鬼久久鬼色| 中文一区二区完整视频在线观看| 欧美精品一区二区三区蜜桃| 欧美成人性福生活免费看| 欧美久久婷婷综合色| 精品视频999| 欧美日韩精品一区二区| 欧美色图免费看| 欧美三级乱人伦电影| 欧美在线视频不卡| 欧美三级视频在线播放| 欧美日韩在线免费视频| 欧美日韩精品一区二区三区| 欧美高清精品3d| 91精品国产综合久久久蜜臀粉嫩 | 亚洲午夜精品久久久久久久久| 亚洲色图在线看| 亚洲激情网站免费观看| 亚洲国产中文字幕| 日韩二区三区在线观看| 另类中文字幕网| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 欧美日韩免费电影| 在线观看91精品国产麻豆| 91精品国产综合久久精品麻豆 | 日韩欧美国产一区二区三区| 欧美大肚乱孕交hd孕妇| 国产日韩欧美精品在线| 国产精品理论片| 亚洲精品国产成人久久av盗摄 | 亚洲欧洲日韩av| 亚洲欧美另类小说| 午夜不卡av免费| 奇米精品一区二区三区四区| 狠狠色综合日日| 不卡一区二区在线| 欧美午夜精品一区| 日韩欧美电影一二三| 国产精品色一区二区三区| 亚洲狼人国产精品| 免费在线观看日韩欧美| 国产91综合一区在线观看| 91久久线看在观草草青青| 欧美一区二区三区四区久久 | 成人精品高清在线| 欧美专区亚洲专区| 久久伊人蜜桃av一区二区| 中文字幕五月欧美| 日韩成人一区二区三区在线观看| 国产精品伊人色| 欧美在线观看视频一区二区三区| 亚洲女同一区二区| 精品综合久久久久久8888| 99久久免费国产| 制服丝袜亚洲色图| 中文字幕亚洲一区二区va在线| 日本欧美一区二区三区乱码| 成人a区在线观看| 日韩欧美国产三级电影视频| 国产精品视频一二三区| 欧美96一区二区免费视频| 91麻豆国产精品久久| 日韩欧美美女一区二区三区| 亚洲欧美影音先锋| 国产一区二区在线电影| 欧美手机在线视频| 国产精品免费网站在线观看| 日本欧美在线看| 欧美视频三区在线播放| 国产精品你懂的在线欣赏| 精品一区精品二区高清| 欧美亚洲愉拍一区二区| 国产精品国产三级国产| 麻豆国产精品视频| 色婷婷综合久久久久中文| 1024亚洲合集| 亚洲电影激情视频网站| 粉嫩欧美一区二区三区高清影视| 欧美精品乱码久久久久久| 中文字幕在线不卡| 国产精品一区二区久久精品爱涩| 91精品欧美综合在线观看最新 | 在线播放国产精品二区一二区四区 | av电影天堂一区二区在线| 精品欧美久久久| 色婷婷综合五月| 国产精品免费观看视频| 国产乱一区二区| 欧美成人精品高清在线播放| 亚洲一级在线观看| 在线观看国产一区二区| 亚洲美腿欧美偷拍| 色综合久久久久综合体桃花网| 国产精品网曝门| 国产成人亚洲综合a∨婷婷图片| 日韩亚洲欧美在线| 麻豆久久一区二区| 91看片淫黄大片一级| 中文字幕免费观看一区| 国产乱码精品一区二区三区五月婷 | 欧美日韩国产三级| 亚洲成人777| 欧美日韩精品欧美日韩精品| 亚洲香蕉伊在人在线观| 欧美在线看片a免费观看| 一区二区成人在线视频 | 亚洲chinese男男1069| 欧美视频精品在线观看| 亚洲h动漫在线| 日韩小视频在线观看专区| 蜜臀国产一区二区三区在线播放| 日韩精品中文字幕在线不卡尤物| 久久99国产精品免费| 久久先锋影音av| 成人18精品视频| 亚洲午夜羞羞片| 日韩午夜激情电影| 国产69精品久久久久777| 成人欧美一区二区三区白人| 一本到高清视频免费精品| 亚洲第一在线综合网站| 欧美一区二区观看视频| 国产乱人伦偷精品视频不卡| 国产精品久99| 欧美精品乱人伦久久久久久| 精品在线视频一区| 中文字幕一区视频| 欧美系列在线观看| 韩国v欧美v日本v亚洲v| 中文字幕一区二区三区视频| 欧美日韩和欧美的一区二区| 久久99精品久久只有精品| 国产精品久久久久一区二区三区共 |