- 博客(0)
- 资源 (11)
空空如也
时频Gabor变换
function [tfr,dgr,gam]=tfrgabor(sig,N,q,h,trace)
%TFRGABOR Gabor representation of a signal.
% [TFR,DGR,GAM]=TFRGABOR(SIG,N,Q,H,TRACE) computes the Gabor
% representation of signal X, for a given synthesis window H, on a
% rectangular grid of size (N,M) in the time-frequency plane. M and N
% must be such that
% N1 = M * N / Q
% where N1=length(X) and Q is an integer corresponding to the
% degree of oversampling.
%
% SIG : signal to be analyzed (length(SIG)=N1).
% N : number of Gabor coefficients in time (N1 must be a multiple
% of N) (default : divider(N1)).
% Q : degree of oversampling ; must be a divider of N
% (default : Q=divider(N)).
% H : synthesis window, which was originally chosen as a Gaussian
% window by Gabor. Length(H) should be as closed as possible
% from N, and must be >=N (default : Gauss(N+1)).
% H must be of unit energy, and CENTERED.
% TRACE : if nonzero, the progression of the algorithm is shown
% (default : 0).
% TFR : Square modulus of the Gabor coefficients. When
% called without output arguments, TFRGABOR runs TFRQVIEW.
% DGR : Gabor coefficients (complex values).
% GAM : biorthogonal (dual frame) window associated to H.
2013-09-26
非平稳信号分析工具
function [tfr,rtfr,hat] = tfrrspwv(x,t,N,g,h,trace);
%TFRSPWV Reassigned smoothed pseudo Wigner-Ville distribution.
% [TFR,RTFR,HAT] = TFRRSPWV(X,T,N,G,H,TRACE)
% computes the smoothed pseudo Wigner-Ville distribution and its
% reassigned version.
%
% X : analysed signal.
% T : the time instant(s) (default : 1:length(X)).
% N : number of frequency bins (default : length(X)).
% G : time smoothing window, G(0) being forced to 1.
% (default : Hamming(N/10)).
% H : frequency smoothing window, H(0) being forced to 1
% (default : Hamming(N/4)).
% TRACE : if nonzero, the progression of the algorithm is shown
%
2013-08-01
椭圆积分程序
#include
#include
using namespace std;
double pi=3.14159;
int main()
{
int i,j;
double K,E,k=0.5;
double M=0,N=0;
for (i=1;i<101;i++)
{
double M0,M1=1;
double N0,N1=1;
for (j=1;j<i+1;j++)
{
//M0=((2*j-1)/(2*j))^2*(k^(2*i));
M0=pow(double((2*j-1)/(2*j)),2)*pow(k,2*i);
N0=M0/(2*i-1);
M1=M1*M0;
N1=N1*N0;
}
M=M+M1;
N=N+N1;
}
K=pi/2*(1+M);
E=pi/2*(1-N);
cout<<K<<endl;
cout<<E<<endl;
return 0;
}
2013-06-28
矩阵保存的C++程序
#include <iostream>
using namespace std;
int main()
{
int i,j;
float val[100][50];
for (i=0;i<100;i++)
{
for (j=0;j<50;j++)
{
val[i][j]=rand()/10000;
}
}
FILE *pfile;
pfile=fopen("RBFLaplace2D.txt","w+");
for (i=0;i<100;i++)
{
for (j=0;j<50;j++)
fprintf(pfile,"%8.5e\t",val[i][j]);
fprintf(pfile,"\n");
}
fclose(pfile);
return 0;
}
2013-06-28
辛普生算法
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int i;
double pi=3.1415926;
double h=pi/100/2;
double x,y0;
double y=0;
for (i=0;i<100;i++)
{
x=i*h;
y0=sin(x)+4*sin(x+h/2.0)+sin(x+h);
y=y0+y;
}
y=y*h/6.0;
cout<<y<<endl;
return 0;
}
2013-06-28
模糊函数程序
function [naf,tau,xi]=ambifunb(x,tau,N,trace);
%AMBIFUNB Narrow-band ambiguity function.
% [NAF,TAU,XI]=AMBIFUNB(X,TAU,N,TRACE) computes the narrow-band
% ambiguity function of a signal X, or the cross-ambiguity
% function between two signals.
2013-05-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人