This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ frequency,fft_result ] = fft_plot( data,Fs,varargin ) | |
% Calculate or plot directly fft results of data. | |
% | |
% [ frequency,fft_result ] = fft_plot( data,Fs,'plot' ) | |
% | |
% inputs: | |
% (1) data: data used to analysis. one row -> one data | |
% (2) Fs: sample frequency | |
% (3) 'plot': veriable input. if there is not this input, fft results will not be | |
% ploted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% signal -> x | |
%begin | |
fs=600; | |
Ts=1/fs; | |
t=1:length(x); | |
t=(t-1).*Ts; | |
%figure('name','original signal');plot(t,x) | |
%IMF=eemd_test(x); %try to use eemd to calculate IOF | |
IMF=emd(x); | |
% original signal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ newindmin newindmax newindzer ] = refresh_index( x,indmin,indmax,indzer ) | |
% Find the new indmin, indmax and inzer | |
%clear result | |
newindmin=[]; | |
newindmax=[]; | |
newindzer=[]; | |
%find new indzer | |
for n=1:length(indzer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [f,t,f_GZC]=Instaneous_Frequency_Test(x,fs) | |
% [f,t]=Instaneous_Frequency_Test(x,fs)[f,t]=Instaneous_Frequency_Test(x,fs) | |
% x is the signal that will be analysised. | |
% fs is the sampling frequency | |
% f is the instaneous frquency | |
% t is the time range of each instaneous frequency | |
% f_GZC is the mean frequency | |
%the length of x must be larger than 8 | |
if length(x)<8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ XPhase,f,Imag,t,f_OGZ,maxf_emdvalue ]=IF_hilbert(x,fs) | |
%x is the signal that will be analysised | |
%fs is sample frequency | |
%XPhase is instanepus phase | |
%f is instaneous phase | |
%t is the time string | |
%f_OGZ is the mean frequency | |
%maxf_emdvalue is the frequency whose property is maximum. | |
if length(x)<2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------- # | |
# Main Configs # | |
# ----------------------- # | |
url: http://pikipity.github.com | |
title: 折腾来折腾去 | |
subtitle: pikipity的blog | |
time: 2013-01-30 | |
author: pikipity | |
self_introduction: |