morsecfun.m

来自「JLAB is a set of Matlab functions I have」· M 代码 · 共 68 行

M
68
字号
function[c]=morsecfun(a,ga,be)%MORSECFUN  Morse wavelet "C"-function.%%   C=MORSECFUN(A,GAMMA,BETA) returns the value of the generalized%   Morse wavelet "C"-parameter in terms of the area of concentration A%   and the GAMMA and BETA parameters. %%   The input parameters must either be matrices of the same size, or%   some may be matrices and the others scalars.  %%   MORSECFUN uses the formula of Olhede and Walden (2002),%   "Generalized Morse Wavelets", for the area of "D_{C,BE,GA}" given%   at the bottom of page 2664.% %   Usage: C = morsecfun(A,ga,be);%  %   'morsecfun --t' runs a test%   _________________________________________________________________%   This is part of JLAB --- type 'help jlab' for more information%   (C) 2004 J.M. Lilly --- type 'help jlab_license' for details          if strcmp(a,'--t')    morsecfun_test;returnend%/********************************************************%Sort out sizesM=1;N=1;if length(a(:))~=1  M=size(a,1);  N=size(a,2);endif length(ga(:))~=1  M=size(ga,1);  N=size(ga,2);endif length(be(:))~=1  M=size(be,1);  N=size(be,2);endif length(a(:))==1  a=a+zeros(M,N);endif length(ga(:))==1  ga=ga+zeros(M,N);endif length(be(:))==1  be=be+zeros(M,N);end%\********************************************************  r=((2*be)+1)./ga;fact=2.*pi.*gamma(r+1-(1./ga)).*gamma(r+(1./ga))./(ga.*gamma(r).^2);c=a./fact+1;function[b]=morsecfun_testbe=1;ga=1;A=[10 150]';C= morsecfun(A,ga,be);A2=morsearea(C,ga,be);tol=1e-10;b=aresame(A,A2,tol);reporttest('MORSECFUN inverts MORSEAREA',b);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?