hspc.m

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

M
36
字号
function ms=hspc(x,tt)
%
%    ms=hspc(x,tt):
%    Function to calculate a normallized marginal spectrum of x(k,n),
%    where k specifies the number of periods, and 
%    n is the number of time values.
%
%    Input-
%	x	- 2-D matrix x(k,n) of the HHT spectrum
%	tt	- vector tt(k) that specifies the period-axis values
%
%    Output-
%	ms	- vector ms(k) that specifies the marginal spectrum		
%
%    Z. SHEN (JHU)		March, 1996 Initial
%    J. Marshak (NASA GSFC)	Jan. 28, 2004 Edited
%
%    Notes-
%    This program can be used after 'hspab.m'.
%    Function 'plot()' can be used to view the marginal spectrum,
%    for example, plot(tt,ms).
%
%    Temporary remarks-
%    Remove commented lines.
%    Why the averaged sum is called as a normalized marginal spectrum?
%    Rename and combine with 'mspc()'.

%----- Get dimensions
n=size(x);
k=n(1);
n=n(2);
;x=x.*x;

%----- Calculate the average sum
h=sum(x')'/n;
        

⌨️ 快捷键说明

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