MC2RFM Calculates the rainflow matrix/intensity for a Markov chain. CALL: [F_rfc,mu_rfc] = mc2rfc(Q,1); [F_rfc,mu_rfc] = mc2rfc(Q,[2 h]); F_rfc = Rainflow matrix / Rainflow intensity [NxN] mu_rfc = Rainflow counting intensity [NxN] Q = Transition matrix for Markov chain [nxn] def = Definition 1: Markov chain (default), N=n 2: Discretized Markov chain, N=n+1 h = Discretization step (ONLY Def 2!) Calculates (1) the rainflow matrix for a Markov chain OR (2) the rainflow intensity for a discretized Markov chain. Example: F = magic(5) Q = mat2tmat(F) Frfc = mc2rfm(Q) See also smc2rfm, mctp2rfm, mc2stat, mc2reverse, cmatplot
Calculates the rainflow matrix/intensity for a switching Markov chain. | |
Display message and abort function. |
Demo for switching AR(1)-processes. | |
Quick test of the routines in module 'markov' |
001 function [F_rfc,mu_rfc] = mc2rfm(Q,def) 002 % MC2RFM Calculates the rainflow matrix/intensity for a Markov chain. 003 % 004 % CALL: [F_rfc,mu_rfc] = mc2rfc(Q,1); 005 % [F_rfc,mu_rfc] = mc2rfc(Q,[2 h]); 006 % 007 % F_rfc = Rainflow matrix / Rainflow intensity [NxN] 008 % mu_rfc = Rainflow counting intensity [NxN] 009 % 010 % Q = Transition matrix for Markov chain [nxn] 011 % def = Definition 1: Markov chain (default), N=n 012 % 2: Discretized Markov chain, N=n+1 013 % h = Discretization step (ONLY Def 2!) 014 % 015 % Calculates 016 % (1) the rainflow matrix for a Markov chain OR 017 % (2) the rainflow intensity for a discretized Markov chain. 018 % 019 % Example: 020 % F = magic(5) 021 % Q = mat2tmat(F) 022 % Frfc = mc2rfm(Q) 023 % 024 % See also smc2rfm, mctp2rfm, mc2stat, mc2reverse, cmatplot 025 026 % References 027 % 028 % P. Johannesson (1999): 029 % Rainflow Analysis of Switching Markov Loads. 030 % PhD thesis, Mathematical Statistics, Centre for Mathematical Sciences, 031 % Lund Institute of Technology. 032 % 033 % P. Johannesson (1998): 034 % Rainflow Cycles for Switching Processes with Markov Structure. 035 % Probability in the Engineering and Informational Sciences, 036 % Vol. 12, No. 2, pp. 143-175. 037 038 % Tested on Matlab 5.3 039 % 040 % History: 041 % Revised by PJ 23-Nov-1999 042 % updated for WAFO 043 % Created by PJ (Pär Johannesson) 1997 044 % Copyright (c) 1997 by Pär Johannesson 045 % Toolbox: Rainflow Cycles for Switching Processes V.1.0, 2-Oct-1997 046 047 % Check input arguments 048 049 ni = nargin; 050 no = nargout; 051 error(nargchk(1,2,ni)); 052 053 if ni<2, def = []; end 054 if isempty(def), def = 1; end 055 056 057 [F_rfc,mu_rfc] = smc2rfm(1,{Q},def); 058 059
Comments or corrections to the WAFO group