Code covered by the BSD License
-
[m,mx,my]=rfmatrix(rf,x,y,fla...
rfmatrix - rain flow matrix estimation
-
rfdemo1(ext)
function rfdemo1(ext)
-
rfdemo2(ext)
function rfdemo2(ext)
-
rfhist(rf,x,rfflag)
rfhist - histogram for use with rainflow data.
-
sig2ext(sig, dt, clsn)
SIG2EXT - search for local extrema in the time history (signal),
-
rainflow.m
-
Rain flow for MATLAB
-
View all files
from
Rainflow Counting Algorithm
by Adam Nieslony
Very fast rainflow cycle counting for MATLAB
|
| rfdemo2(ext)
|
function rfdemo2(ext)
% function rfdemo2(ext)
%
% RFDEMO1 shows cycles extracted from signal
% using rainflow algoritm. Good for very long
% time signals (100 000 points).
%
% INPUT: ext - option; number, vector with turning
% points or pure signal. Default ext=10000.
%
% OUTPUT: no enable.
%
% SYNTAX:
% >>rfdemo2
% >>rfdemo2(50000)
% >>rfdemo2(my_time_signal)
% By Adam Niesony
% ajn@po.opole.pl
error(nargchk(0,1,nargin))
if nargin==0,
% turning points from 10000 random numbers
ext=sig2ext(randn(10000,1));
elseif length(ext(:))==1,
% turning points from n random numbers
ext=sig2ext(randn(1,ext));
else
% turning points from vector ext
ext=sig2ext(ext);
end
ext=sig2ext(ext);
rf=rainflow(ext);
figure, rfhist(rf,30,'ampl')
figure, rfhist(rf,30,'mean')
figure, rfmatrix(rf,30,30)
|
|
Contact us at files@mathworks.com