⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tfr_s.m

📁 linear time-frequency toolbox
💻 M
字号:
function f=tfr_s(self,c,Ls,dim)%TFR_S  Synthesis transform%  Usage: f=tfr_s(tfr,c)%         f=tfr_s(tfr,c,Ls)%         f=tfr_s(tfr,c,[],dim)%         f=tfr_s(tfr,c,Ls,dim)%%   Input parameters:%         tfr   : Time/frequency representation handle.%         c     : Array of coefficients.%         Ls    : length of signal.%         dim   : Dimension of which to do the transform.%   Output parameters:%         f     : Signal.%%   TFR_S(tfr,c) computes the synthesis transform of the coefficients c as%   speficied by tfr.%%   TFR_S(tfr,c,Ls) does as above but cuts or extends f to length Ls.%%   TFR_S(tfr,c,[],dim) applies the transform along dimension dim.%   TFR_S(tfr,c,Ls,dim) does the same, but cuts or extends f to length Ls.%%   SEE ALSO:  TFR_CREATE, TFR_A, TFR_AR, TFR_CLEARerror(nargchk(2,4,nargin));D=ndims(c);if nargin<4  dim=1;else  if (prod(size(dim))~=1 || ~isnumeric(dim))    error('dim must be a scalar.');  end;  if rem(dim,1)~=0    error('dim must be an integer.');  end;  if (dim<1) || (dim>D)    error(sprintf('dim must be in the range from 1 to %d.',D));  end;end;if nargin<3  Ls=-1;else  if isempty(Ls)    Ls=-1;  end;    end;if dim>1  order=[dim, 1:dim-1,dim+1:D];  % Put the desired dimension first.  c=permute(c,order);end;% Remember the exact size for later.permutedsize=size(c);  % Reshape c to a matrix.c=reshape(c,size(c,1),prod(size(c))/size(c,1));% Let comp_s do all the work.f=comp_s(self,c,0,'TFR_S',Ls);% Remember that we changed the length of the first dim.permutedsize(1)=size(f,1);% Restore the original, permuted shape, except for the first dimension% which changed.f=reshape(f,permutedsize);if dim>1  % Undo the permutation.  f=ipermute(f,order);end;

⌨️ 快捷键说明

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