CMAT2LC Calculates the level crossings from a cycle matrix. CALL: lc = cmat2lc(param,F); Input: param = Parameter vector, [a b n], defines the discretization. F = Cycle matrix (e.g. rainflow matrix) [nxn] Output: lc = a two column matrix with levels and number of upcrossings. Example: x = load('sea.dat'); TP=dat2tp(x); RFC=tp2rfc(TP); param = [-2 2 151]; F = cc2cmat(param,RFC); lc = cmat2lc(param,F); plot(lc(:,1),lc(:,2)) See also cc2cmat
Calculates a counting distribution from a cycle matrix. | |
Calculates discrete levels given the parameter matrix. | |
Display message and abort function. |
% CHAPTER4 contains the commands used in Chapter 4 of the tutorial | |
Extrapolate level crossing spectrum | |
Script to computer exercises 2 | |
Extrapolates a rainflow matrix. | |
Quick test of the routines in module 'cycles' |
001 function lc = cmat2lc(param,F) 002 %CMAT2LC Calculates the level crossings from a cycle matrix. 003 % 004 % CALL: lc = cmat2lc(param,F); 005 % 006 % Input: 007 % param = Parameter vector, [a b n], defines the discretization. 008 % F = Cycle matrix (e.g. rainflow matrix) [nxn] 009 % Output: 010 % lc = a two column matrix with levels and number of upcrossings. 011 % 012 % Example: 013 % x = load('sea.dat'); TP=dat2tp(x); RFC=tp2rfc(TP); 014 % param = [-2 2 151]; F = cc2cmat(param,RFC); 015 % lc = cmat2lc(param,F); 016 % plot(lc(:,1),lc(:,2)) 017 % 018 % See also cc2cmat 019 020 % Tested on Matlab 6.0 021 % 022 % History: 023 % Revised by jr 01-Apr-2001 024 % - Example added 025 % - Updated help 026 % Created by PJ (Pär Johannesson) 14-Jan-2000 027 028 % Check input arguments 029 ni = nargin; 030 no = nargout; 031 error(nargchk(2,2,ni)); 032 033 lc = [levels(param)' diag(cmat2nt(F))]; 034
Comments or corrections to the WAFO group