Home > wafo > cycles > cmat2lc.m

cmat2lc

PURPOSE ^

Calculates the level crossings from a cycle matrix.

SYNOPSIS ^

lc = cmat2lc(param,F)

DESCRIPTION ^

 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003