ppmfact.m
上传用户:haiyisale
上传日期:2013-01-09
资源大小:3246k
文件大小:2k
- function [MatFACT,PM,OkFACT] = ppmfact(H,G,flagCONTROL)
- %PPMFACT Polyphase matrix factorizations.
- % [MATFACT,PM] = PPMFACT(H,G) returns the polyphase matrix
- % PM associated with two Laurent polynomials H and G and
- % the factorizations MATFACT of PM.
- % This polyphase matrix (see PPM) is such that:
- %
- % | even(H(z)) even(G(z)) |
- % PM(z) = | |
- % | odd(H(z)) odd(G(z)) |
- %
- % MATFACT is a cell array such that each cell contains
- % a factorization of PM.
- %
- % In addition, [MATFACT,PM,OKFACT] = PPMFACT(H,G,flagCONTROL)
- % returns a logical array OKFACT. Each factorization is
- % controlled and OKFACT is such that:
- % OKFACT(k) = true if an only if prod(MATFACT{k}{:}) == PM;
- %
- % Each "elementary factor" F = MatFACT{j}{k} is of one
- % of the two following form:
- %
- % | 1 0 | | 1 P |
- % | | | |
- % F = | | or F = | |
- % | | | |
- % | P 1 | | 0 1 |
- %
- % where P is a Laurent polynomial.
- %
- % Example:
- % [Hs,Gs,Ha,Ga] = wave2lp('db2');
- % [MatFACT,PM] = ppmfact(Hs,Gs);
- % disp(PM);
- % displmf(MatFACT{1});
- %
- % See also EVEN, ODD, PPM.
- % M. Misiti, Y. Misiti, G. Oppenheim, J.M. Poggi 25-Apr-2001.
- % Last Revision: 30-Jun-2003.
- % Copyright 1995-2004 The MathWorks, Inc.
- % $Revision: 1.1.6.1 $ $Date: 2004/03/15 22:36:54 $
- % Polyphase Matrix.
- PM = ppm(H,G);
- % Compute factorizations.
- MatFACT = mftable(PM);
- % Control of factorizations under request.
- if nargin>2
- nbFACT = length(MatFACT);
- OkFACT = true(1,nbFACT);
- for k = 1:nbFACT
- OkFACT(k) = prod(MatFACT{k}{:}) == PM;
- end
- end