qlmaoshal

所属分类:大数据
开发工具:matlab
文件大小:1732KB
下载次数:0
上传日期:2018-11-14 13:18:44
上 传 者Doriz
说明:  Mathematical Methods by Moor n Stiling div hr div B 文件列表 B : div div i
(Mathematical Methods by Moor n Stiling div hr div B file list B: div i)

文件列表:
7data (0, 2018-11-08)
7data\ag.wav (104473, 2008-03-15)
7data\bssin1.wav (180268, 2008-03-15)
7data\bssin2.wav (180268, 2008-03-15)
7data\bssin3.wav (180268, 2008-03-15)
7data\bssout1.wav (180268, 2008-03-15)
7data\bssout2.wav (180268, 2008-03-15)
7data\bssout3.wav (180268, 2008-03-15)
7data\d101 (183723, 2008-03-15)
7data\d102 (185186, 2008-03-15)
7data\d121 (226063, 2008-03-15)
7data\d122 (229528, 2008-03-15)
7data\d41 (58875, 2008-03-15)
7data\d42 (60487, 2008-03-15)
7data\d61 (99476, 2008-03-15)
7data\d62 (102686, 2008-03-15)
7data\d81 (141704, 2008-03-15)
7data\d82 (144231, 2008-03-15)
7data\im1.mat (29016, 2008-03-15)
7data\tkm.wav (90695, 2008-03-15)
7data\vm.wav (90156, 2008-03-15)
misc (0, 2018-11-08)
misc\b2n.m (127, 2008-03-15)
misc\bernapprox.m (449, 2008-03-15)
misc\bernpoly.m (283, 2008-03-15)
misc\bsplineval1.m (1033, 2008-03-15)
misc\chebinterp.m (300, 2008-03-15)
misc\chi2.m (264, 2008-03-15)
misc\compmap1.m (1181, 2008-03-15)
misc\compmap4.m (461, 2008-03-15)
misc\computeremez.m (2402, 2008-03-15)
misc\crtgamma.m (300, 2008-03-15)
misc\crtgammapoly.m (418, 2008-03-15)
misc\crypttest.m (218, 2008-03-15)
misc\d2b.m (176, 2008-03-15)
misc\diagstack.m (283, 2008-03-15)
misc\discapprox.m (559, 2008-03-15)
misc\divdiff.m (391, 2008-03-15)
misc\eigfilcon0.m (1379, 2008-03-15)
... ...

The directories here contain code associated with "Mathematical Methods and Algorithms for Signal Processing" by Todd K. Moon and Wynn C. Stirling. DISCLAIMER: We make no warranty, express or implied, that the programs or algorithms presented in this book (or its accompanying media) are free of error, or that they will meet your requirements for any particular applications. They should not be relied upon for solving a problem whose incorrect solution could result in injury to a person or loss of property. Any and all use of the programs and algorithms associated with this book is at your own risk. The authors and publisher disclaim all liability for direct or consequential damages resulting from your use of the programs. These m-files are user-contributed routines, and are not a product of The MathWorks, Inc. The MathWorks assume no responsibility for any errors that may exist in these routines. USAGE: You are free to use the programs or any derivative of them for any scientific purpose, but please reference this book. COPYRIGHT: Programs and data in these directories are Copyright (C) 1999 by Todd K. Moon, unless otherwise indicated in the program file or appropriate readme file. VERSION: The code listed here has been written with Matlab v. 5 or above. (Most of the algorithms will run with v. 4, but in some cases we make use of 'end', cell arrays, and other version 5 features. DIRECTORIES: bookalgs -- contains the algorithms listed or referenced in the book, as well as function which these reference mkpict -- contains functions and Matlabs scripts that are used to make the Matlab-based plots appearing in the book. These are provided for researchers who want to profit from the form of a plot for their own work, and who want to test the result. Correspondance between the figures and the Matlab files is provided by the file mkpict/listoffigures. Many of these functions and scripts are were used as the basis for testing the algorithms referenced in the book, and in that regard should be regarded as part of the testing suite. testers -- contains functions and scripts to test the algorithms appearing in the book, other than those that appear in the mkpict directory. These can be used as examples of calling sequences. solutions -- most (but not all) homework problems requiring Matlab code to be written have code provided here. DON'T CHEAT yourself by rushing to the solution. Learn to do it yourself! misc -- is a treasure trove of functions which were written more or less in parallel with the book. Some categories of functions: number theoretical methods: including fast convolution, CRT for integers and polynomials, Euclidean algorithm, polynomial operations, linear congruences, and many others. interpolation and approximation: including Bernstein polynomials, Neville's algorithm, splines, rational approximation, remez (minimax), Vandermonde matrix equation solver, trigonometric interpolation, pade approximaation, etc. examples related to the book: including neural networks, Viterbi, Pisarenko, Prony, composite mappings, HMM training (with unscaled forward/backward probabilities), etc. The source of many of these is a part of the book --- which was removed due to lack of space --- about-number theoretical methods in signal processing, and another part --- also removed --- on interpolation and approximation. data -- example data used in the blind source separation; the image for tomographic reconstruction; wavelet and scaling function data for plots. TOOLBOXES: The code written should run with Matlab without additional toolboxes, with the following known exceptions: bookalgs/eigmakePQ.m requires the use of the sinc function (found in the signal processing toolbox) bookalgs/testirwls.m makes use of the freqz function for plotting (found in the signal processing toolbox) misc/kaisfilt.m requires the use of the sinc and the frequz function (found in the signal processing toolbox) misc/ratintfilt.m makes use of the zplane function for plotting (found in the signal processing toolbox) mkpict/testeigfil.m and mkpict/testeigfil2.m use the freqz function for plotting (found in the signal processing toolbox) testers/bliter.m requires the use of the sinc function (found in the signal processing toolbox) testers/lpfilttest.m makes use of the freqz function for plotting (found in the signal processing toolbox) testers/testbplp.m makes use of the freqz function for plotting (found in the signal processing toolbox) *************************************************************** Directory: bookalgs *************************************************************** art1.m % % Produce an updated solution x to Ax = b using the algebraic reconstruction % technique. % (This function is for demonstration, and does not precompute % row norms as a more efficient version would.) No constraints are applied. % % function x = art1(A,x,b) % % A = input matrix % x = initial solution % b = right-hand side % % Output x= updated solution bayes3.m % Minimax decision for Gaussian bidiag.m % % bidiagonalize the real symmetric matrix A: UAV' = B, % % function [B,U,V] = bidiag(A) % % A = matrix to be factored % % B = bidiagonal % U = orthogonal transformation (optional output) % V = orthogonal transformation (optional output) bliter1.m % Iterate on bandlimited data using two projections bss1.m % Blind source separation example bssg.m % % The nonlinear function in the neural network % % function y = bssg(v). cholesky.m % % Compute the Cholesky factorization of B, B = LL' % (this version does not require additional storage) % % function [L] = cholesky(B) % % B = matrix to be factored % % L = lower triangular factor compmap2.m % Run the composite mapping algorithm to make a positive sequence conjgrad1.m % function [x,D] = conjgrad1(Q,b) % % Solve the equation Qx = b using conjugate gradient, where Q is symmetric % % Q = symmetric matrix % b = right-hand side conjgrad2.m % % Apply the conjugate gradient to minimize a function % % function [x,X] = conjgrad2(x,grad,hess) % % x = starting point % grad = the gradient of the function to minimize (a function name) % hess = the gradient of the function to minimize (a function name) % % Output x = update of point % X = array of points examined (optional) convnorm.m % % Compute the Hamming distance between the branchweights and the input % This function may be feval'ed for use with the Viterbi algorithm % (state and nextstate are not used here) % % function d = convnorm(branch,input,state,nextstate) % dijkstra.m % % Find the set of shortest paths from vertex a to each of the other vertices % in the graph represented by the cost matrix. % If there is no branch from i to j, then cost(i,j) = inf. % % function [dist,prevnode] = dijkstra(a,cost) % % a = starting vectex % cost = cost matrix for graph % % dist(i) = shortest distance from vertex a to vertex i. % prevnode(i) = vertex prior to vertex i on the shortest path to i. dirtorefl.m % % Convert from direct-form FIR filter coefficients in a % to lattice form % % function kappa = refltodir(a) % % a = direct form coefficients % % kapp = lattice form coefficients durbin.m % % solve the nxn Toeplitz system Tx = [r(1)..r(n)] % given a vector r = (r_0,r_1,\ldots,r_{n+1}), % % Since matlab has no zero-based indexing, r(1) = r_0 % % function [x] = durbin(r) % % r = input vector % x = solution to Tx = r eigfil.m % % Design an eigenfilter % % function h = eigfil(wp,ws,m,alpha) % % wp = passband frequency % ws = stopband frequency % m = number of coefficients (must be ODD) % alpha = tradeoff parameter between stopband and passband % % h = filter coefficients eigfilcon.m % % Design an eigenfilter with values constrained at some frequencies % % function h = eigfilcon(wp,ws,N,alpha, Wo, d) % % wp = passband frequency % ws = stopband frequency % m = number of coefficients (must be ODD) % alpha = tradeoff parameter between stopband and passband % Wo = list of constraint frequencies % d = desired magnitude values at those frequencies % % h = filter coefficients eigmakePQ.m % % Make the P and Q matrices for eigenfiltering % % function [P,Q] = eigmakePQ(wp,ws,N) % % wp = passband frequency % ws = stopband frequency % N = number of coefficients eigqrshiftstep.m % % Perform the implicit QR shift on T, where the shift % is obtained by the eigenvalue of the lower-right 2x2 submatrix of T % % function [T,Q] = eigqrshiftstep(T,Qin) % % T = tridiagonal matrix % Qin = (optional) orthogonal input matrix % % T = T matrix after QR shift % Q = (optional) orthogonal matrix em1.m % Illustration of example em algorithm computations % esprit.m % % Compute the frequency parameters using the ESPRIT method % %function f = esprit(Ryy,Ryz,p) % % % Ryy = (estimate of) the autocorrelation of the observations % Ryz = (estimate of) the correlation between y[n] and y[n+1] % p = number of modes % % f = vector of frequencies (in Hz/sample) et1.m % et1.m % Perform tomographic reconstruction using the EM algorithm % im is a (nr x nc) image scaled so that 0=white, 255=black % nr = number of rows; nc = number of columns fblp.m % % Forward-backward linear predictor % % function [a,sigma] = fblp(x,n) % % Given a sequence of data in the columns vector x, % return the coefficients of an nth order forward-backward linear predictor in a % % x = data sequence % n = length of filter % % a = filter coefficients % sigma = standard deviation of noise fordyn.m % % Do forward dynamic programing % % function [pathlist,cost] = fordyn(G,W) % % G = list of next vertices % W = list of costs to next vertices % % pathlist = list of paths through graphs % cost = cost of the paths gamble.m % % Return the bets for a race with win probabilities p and subfair odds o, % % function [b0,B] = gamble(p,o) % % p = probability of win % o = subfair odds gaussseid.m % % Produce an updated solution x to Ax = b using Gauss-Seidel iteration % % function x = gausseid(A,x,b) % % A = input matrix % x = initial solution % b = right-hand side % % Output x= updated solution golubkahanstep.m % % Given a bidiagonal matrix B with NO zeros on the diagonal or % superdiagonal, create a new B <-- U'BV, using an implicit QR shift on % T = B'B % % function [B,U,V] = golubkahanstep(B,Uin,Vin) % % B = bidiagonal matrix % Uin, Vin = last estimate of U and V % % B = new bidiagonal matrix % U, V = new estimate of U and V gramschmidt1.m % % Compute the Gram-Schmidt orthogonalization of the % columns of A, assuming nonzero columns of A % % function [Q,R] = gramschmidt1(A) % % A = input matrix to be factored (assuming nonzero columns) % % Q = orthogonal matrix % R = upper triangular matrix such that A = QR hmmApiupn.m % % update the HMM probabilities A and pi using the normalized forward and % backward probabilities alphahat and betahat % % function [A,pi] = hmmapiupn(y,alphahat,betahat,HMM) % % y = input sequence % alphahat = normalized alphas % betahat = normalized betas % HMM = current model parameters % % A = updated transition probability matrix % pi = updated initial probability matrix hmmabn.m % % compute the normalized forward and backward probabilities for the model HMM % and the output probabilities and the normalization factor % % function [alphahat,betahat,f,c] = hmmabn(y,HMM) % % y = input sequence y[1],y[2], ..., y[T] % HMM = HMM data % % alphahat = [ alphahat(:,1) alphahat(:,2) ... alphahat(:,T)] % (alphahat(:,t) = alphahat(y_t^T,:)) % betahat = [betahat(:,2) ... betahat(:,T-1) betahat(:,T) betahat(:,T+1)] % (betahat(:,t) = betahat(y_{t+1}^T|:)) % f = initial probability types % c = normalizing factors hmmdiscf.m % % Compute the pmf value for a discrete distribution % % function f = hmmdiscf(f) % % y = output value % f = output distribution % s = state hmmdiscfupn.m % % Update the discrete HMM output distribution f using the normalized forward % and backward probabilities alphahat and betahat % % function f = hmmdiscfupn(y,alphahat,betahat,c,HMM) % % y = output sequence % alphahat = normalized alphas % betahat = normalized betas % c = normalization constants % HMM = current model parameters % % f = updated output distribution hmmf.m % % Determine the likelihood of the output y for the model HMM % This function acts as a clearinghouse for different probability types % % function p = hmmf(y,f,s) % % y = output value % f = probability distribution % s = state % % p = likelihood hmmfupdaten.m % % Provide an update to the state output distributions for the HMM model % using the normalized probabilities alphahat and betahat % % function f = hmmfupdaten(y,alphahat,betahat,HMM) % % y = output sequence % alphahat = normalized alphas % betahat = normalized betas % c = normalization factors % HMM = current model paramters % % f = updated output distribution hmmgausf.m % % Compute the pmf value for a Gaussian distribution % % function f = hmmgausf(y,f,s) % % y = output value % f = output distribution % s = state hmmgausfupn.m % % Update the Gaussian output distribution f of the HMM using the normalized % probabilities alphahat and betahat % % function f = hmmgausfupn(y,alphahat,betahat,c,HMM) % % y = output sequence % alphahat = normalized alphas % betahat = normalized betas % c = normalization constants % HMM = current model parameters % % f = updated output distribution hmmgendat.m % % Generate T outputs of a Hidden Markov model HMM % % function [y,ss] = hmmgendat(T,HMM) % % T = number of samples to produce % HMM = HMM model parameters % % y = output sequence % s = (optional) state sequence hmmgendisc.m % % Generate T outputs of a HMM with a discrete output distribution % % function y = hmmgendisc(T,HMM) % % T = number of outputs to produce % HMM = model parameters % % y = output sequence % ss = (optional) state sequence (for testing purposes) hmmgengaus.m % % Generate T outputs of a HMM with a Gaussian output distribution % % function y = hmmgengaus(T,HMM) % % T = number of outputs to produce % HMM = model parameters % % y = output sequence % ss = (optional) state sequence (for testing purposes) hmminitvit.m % % Initialize the Viterbi algorithm stuff for HMM sequence identification % % function hmminitvit(inHMM,inpathlen) % % inHMM = a structure containing the initial probabilities, state transition % probabilities, and output probabilities % inpathlen = length of window used in VA hmmlpyseqn.m % % Find the log likelihood of the sequence y[1],y[2],...,y[T], % using the parameters in HMM.% That is, compute log P(y|HMM), % % function lpy = hmmlpyseqn(y,HMM) % % y = input sequence = y[1],y[2],\ldots,y[T] % HMM = current estimate of HMM parameters % % lpy = log P(y|HMM) hmmlpyseqv.m % % Find the log likelihood of the sequence y[1],y[2],...,y[T] % i.e., compute log P(y|HMM), % using the the Viterbi algorithm % % function lpy = hmmlpyseqv(y,HMM) % % y = input sequence % HMM = HMM parameters % % lpy = log likelihood value hmmnorm.m % % Compute the branch norm for the HMM using the Viterbi approach % % function d = hmmnorm(branchweight,y,state,nextstate) % % branchweight= log transition probability % y = output % state = current state in trellis % nextstate = next state in trellis % % d = branch norm (log-likelihood) hmmnotes.m % Notes on data structures and functions for the HMM % hmmtest2vb.m % Test the HMM using both Viterbi and EM-algorithm based training methods hmmupdaten.m % % Compute updated HMM model from observations % % function HMM = hmmupdaten(y,HMM) % % y = output sequence % HMM = current model parameters % % hmmo = updated model parameters hmmupdatev.m % % Compute updated HMM model from observations y using Viterbi methods % Assumes only a single observation sequence. % % function HMM = hmmupdatev(y,HMM) % % y = sequence of observations % HMM = old HMM (to be updated) % % hmmo = updated HMM hmmupfv.m % % Compute an update to the distribution f based upon the data y % and the (assumed) state assignment in statelist % % function fnew = hmmupfv(y,statelist,n,f) % % y = sequence of observations % statelist = state assignments % n = number of states % f = distribution (cell) to update % % fnew = updated distribution houseleft.m % % Apply the Householder transformation based on v to A on the left % % function A = houseleft(A,v) % % A = an mxn matrix % v = a household vector % % B = H_v A houseright.m % % Apply the householder transformation based on v to A on the right % % function A = houseright(A,v) % % A = an mxn matrix % v = a household vector % % B = H_v A ifs3a.m % Plot the logistic map and the orbit of a point % initcluster.m % % % Choose an initial cluster at random % % function Y = initcluster(X,m) % % X = input data: each column is a training data vector % m = number of clusters % Y = initial cluster: each column is a point initpoisson.m % % Initialize the global variables for the poisson generator % % function initpoisson initvit1.m % % Initialize the data structures and pointers for the Viterbi algorithm % % function initvit1(intrellis, inbranchweight, inpathlen, innormfunc) % % intrellis: a description of the successor nodes % e.g. [1 3; 3 4; 1 2; 3 4] % inbranchweight: weights of branches used for comparison, saved as % cells in branchweight{state_number, branch_number} % branchweight may be a vector % e.g. branchweight{1,1} = 0; branchweight{1,2} = 6; % branchweight{2,1} = 3; branchweight{2,2} = 3; % branchweight{3,1} = 6; branchweight{3,2} = 0; % branchweight{4,1} = 3; branchweight{4,2} = 3; % inpathlen: length of window over which to compute % normfun: the norm function used to compute the branch cost invwavetrans.m % % Compute the inverse discrete wavelet transform % % function c = invwavetrans(C,ap,coeff) % % C = input data (whose inverse transform is to be found) % ap = index for start of coefficients for the jth level % coeff = wavelet coefficients % % c = inverse transformed data invwavetransper.m % % Compute the periodized inverse discrete wavelet transform % % function c = invwavetransper(C,coeff,J) % % C = input data % coeff = wavelet coefficients % J = (optional) number of levels of inverse transform to compute % If length ... ...

近期下载者

相关文件


收藏者