CMAT2DAM Calculates the total Palmgren-Miner damage of a cycle matrix. CALL: D = cmat2dam(param,F,beta,K); Output: D = Damage. [1xm] Input: param = Parameter vector, [a b n], defines discretization. F = Cycle matrix. [nxn] beta = Beta-values, material parameter [1xm] K = K-value, material parameter (Optional, Default: 1) [1x1] The damage is calculated as D(i) = sum ( K * S^beta(i) ), S = (max-min)/2 Example: param = [-1 1 32]; F = mktestmat(param); bv = 3:8; D = cmat2dam(param,F,bv); plot(bv,D,'x-') See also cmat2dmat
Calculates a histogram of amplitudes from a cycle 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 3 | |
Script to computer exercises 4 | |
Extrapolates a rainflow matrix. |
001 function D = cmat2dmat(param,F,beta,K) 002 %CMAT2DAM Calculates the total Palmgren-Miner damage of a cycle matrix. 003 % 004 % CALL: D = cmat2dam(param,F,beta,K); 005 % 006 % Output: 007 % D = Damage. [1xm] 008 % Input: 009 % param = Parameter vector, [a b n], defines discretization. 010 % F = Cycle matrix. [nxn] 011 % beta = Beta-values, material parameter [1xm] 012 % K = K-value, material parameter (Optional, Default: 1) [1x1] 013 % 014 % The damage is calculated as 015 % D(i) = sum ( K * S^beta(i) ), S = (max-min)/2 016 % 017 % Example: 018 % param = [-1 1 32]; F = mktestmat(param); 019 % bv = 3:8; D = cmat2dam(param,F,bv); plot(bv,D,'x-') 020 % 021 % See also cmat2dmat 022 023 % Tested on Matlab 6.0 024 % 025 % History: 026 % Revised by PJ 03-Nov-1999 027 % - updated for WAFO 028 % Created by PJ (Pär Johannesson) 1997 029 % from 'Toolbox: Rainflow Cycles for Switching Processes V.1.0' 030 031 % Check input and otput 032 033 ni = nargin; 034 no = nargout; 035 error(nargchk(3,4,ni)); 036 037 if ni < 4 038 K=[]; 039 end 040 041 % Set default values 042 043 if isempty(K) 044 K = 1; 045 end 046 047 % Calculate damage 048 049 n = length(F); 050 amp = cmat2amp(param,F); % Histrogram of ranges 051 052 m=length(beta); D=zeros(1,m); 053 054 for i=1:m 055 D(i) = K*sum((amp(:,1).^beta(i)).*amp(:,2)); 056 end 057 058 059
Comments or corrections to the WAFO group