cnstm.m

来自「一种新的时频分析方法的matlab源程序。」· M 代码 · 共 21 行

M
21
字号
function z=cnstm(p,nf1,nf2,nn)
%
% z=cnstm(p,nf1,nf2,nn):
%
% Function to construct a matrix of constant horizontal value.
%
% Input-
%	p	- vector p(nf2), representing the power spectrum
%	nf1	- index of the lower range of frequency selected
%	nf2	- index of the upper range of frequency selected
%	nn	- the length of the matrix; p, power spectrum; 
% Output-
%	z	- matrix z(nf2-nf1,nn) of constant horizontal value
% 

in=nf2-nf1+1;
z=zeros(in,nn);
for i=1:in,
   z(i,:)=p(nf1+i-1)*ones(1,nn);
end
return

⌨️ 快捷键说明

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