NT2LC Calculates the level crossings from a cycle matrix. CALL: lc = nt2lc(param,NT); Input: param = Parameter vector, [a b n], defines the discretization. NT = Coutning distribution. [nxn] Output; lc = a two column matrix with levels and number of upcrossings. Example: F0 = round(triu(rand(50),1)*10); NT = cmat2nt(F0); param = [-1 1 50]; lc = nt2lc(param,NT); lcplot(lc) See also cmat2nt, cc2cmat
Calculates discrete levels given the parameter matrix. | |
Display message and abort function. |
Quick test of the routines in module 'cycles' |
001 function lc = nt2lc(param,NT) 002 %NT2LC Calculates the level crossings from a cycle matrix. 003 % 004 % CALL: lc = nt2lc(param,NT); 005 % 006 % Input: 007 % param = Parameter vector, [a b n], defines the discretization. 008 % NT = Coutning distribution. [nxn] 009 % Output; 010 % lc = a two column matrix with levels and number of upcrossings. 011 % 012 % Example: 013 % F0 = round(triu(rand(50),1)*10); 014 % NT = cmat2nt(F0); 015 % param = [-1 1 50]; 016 % lc = nt2lc(param,NT); 017 % lcplot(lc) 018 % 019 % See also cmat2nt, cc2cmat 020 021 % Tested on Matlab 6.0 022 % 023 % History: 024 % Created by PJ (Pär Johannesson) 18-May-2000 025 026 % Check input arguments 027 ni = nargin; 028 no = nargout; 029 error(nargchk(2,2,ni)); 030 031 lc = [levels(param)' diag(NT)]; 032
Comments or corrections to the WAFO group