CMAT2DMAT Computes the (Palmgren-Miner) damage matrix from a cycle matrix. CALL: Dmat = cmat2dmat(param,F,beta,K) Input: Dmat = Damage matrix. [nxn] Output: param = Parameter vector, [a b n], defines discretization. F = Cycle matrix. [nxn] beta = beta exponent. [1x1] K = K-value, material parameter (Optional, Default: 1) [1x1] Example: param = [-1 1 32]; F = mktestmat(param); Dmat = cmat2dmat(param,F,6); cmatplot(Dmat) See also cmat2dam, cmatplot, cc2cmat
Calculates discrete levels given the parameter matrix. | |
Display message and abort function. |
% CHAPTER4 contains the commands used in Chapter 4 of the tutorial | |
Script to computer exercises 2 | |
Script to computer exercises 4 | |
Rainflow matrix for Switching Markov Chains of Turning Points. | |
Extrapolates a rainflow matrix. |
001 function Dmat = cmat2dmat(param,F,beta,K) 002 % CMAT2DMAT Computes the (Palmgren-Miner) damage matrix from a cycle matrix. 003 % 004 % CALL: Dmat = cmat2dmat(param,F,beta,K) 005 % 006 % Input: 007 % Dmat = Damage matrix. [nxn] 008 % Output: 009 % param = Parameter vector, [a b n], defines discretization. 010 % F = Cycle matrix. [nxn] 011 % beta = beta exponent. [1x1] 012 % K = K-value, material parameter (Optional, Default: 1) [1x1] 013 % 014 % Example: 015 % param = [-1 1 32]; F = mktestmat(param); 016 % Dmat = cmat2dmat(param,F,6); 017 % cmatplot(Dmat) 018 % 019 % See also cmat2dam, cmatplot, cc2cmat 020 021 % Tested on Matlab 6.0 022 % 023 % History: 024 % Revised by PJ 04-Jan-2000 025 % - updated for WAFO 026 % Created by PJ (Pär Johannesson) 1997 027 % from 'Toolbox: Rainflow Cycles for Switching Processes V.1.0' 028 029 030 % Check input and otput 031 032 ni = nargin; 033 no = nargout; 034 error(nargchk(3,4,ni)); 035 036 if ni < 4 037 K=[]; 038 end 039 040 % Set default values 041 042 if isempty(K) 043 K = 1; 044 end 045 046 % Calculate damage matrix 047 048 n = length(F); 049 u=levels(param); 050 Dmat = zeros(n,n); 051 052 for i=1:n-1 053 for j=i+1:n 054 Dmat(i,j) = ((u(j)-u(i))/2)^beta*F(i,j); 055 end 056 end 057 058 059
Comments or corrections to the WAFO group