资源简介
matlab雨流计数法The rainflow cycle counting algorithm is widely used while fatigue life assessment of machine components or structures under non-constant amplitude loading.
代码片段和文件信息
/* RAINFLOW $ Revision: 1.1 $ */
/* by Adam Nieslony 2009 */
#include
#include “mex.h“
/* ++++++++++ BEGIN RF3 [ampl ampl_mean nr_of_cycle] */
/* ++++++++++ Rain flow without time analysis */
void
rf3(mxArray *array_ext mxArray *hs[]) {
double *pr *po a[16384] ampl mean;
int tot_num index j cNr;
mxArray *array_out;
tot_num = mxGetM(array_ext) * mxGetN(array_ext);
pr = (double *)mxGetPr(array_ext);
array_out = mxCreateDoubleMatrix(3 tot_num-1 mxREAL);
po = (double *)mxGetPr(array_out);
j = -1;
cNr = 1;
for (index=0; index a[++j]=*pr++;
while ( (j >= 2) && (fabs(a[j-1]-a[j-2]) <= fabs(a[j]-a[j-1])) ) {
ampl=fabs( (a[j-1]-a[j-2])/2 );
switch(j)
{
case 0: { break; }
case 1: { break; }
case 2: {
mean=(a[0]+a[1])/2;
a[0]=a[1];
a[1]=a[2];
j=1;
if (ampl > 0) {
*po++=ampl;
*po++=mean;
*po++=0.50;
}
break;
}
default: {
mean=(a[j-1]+a[j-2])/2;
a[j-2]=a[j];
j=j-2;
if (ampl > 0) {
*po++=ampl;
*po++=mean;
*po++=1.00;
cNr++;
}
break;
}
}
}
}
for (index=0; index ampl=fabs(a[index]-a[index+1])/2;
mean=(a[index]+a[index+1])/2;
if (ampl > 0){
*po++=ampl;
*po++=mean;
*po++=0.50;
}
}
/* you can free the allocated memeory */
/* for array_out data */
mxSetN(array_out tot_num - cNr);
hs[0]=array_out;
}
/* ++++++++++ END RF3 */
/* ++++++++++ BEGIN RF5 [ampl ampl_mean nr_of_cycle cycle_begin_time cycle_period_time]*/
/* ++++++++++ Rain flow with time analysis */
void
rf5(mxArray *array_ext mxArray *array_t mxArray *hs[]) {
double *pr *pt *po a[16384] t[16384] ampl mean period atime;
int tot_num index j cNr;
mxArray *array_out;
tot_num = mxGetM(array_ext) * mxGetN(array_ext);
pr = (double *)mxGetPr(array_ext);
pt = (double *)mxGetPr(array_t);
array_out = mxCreateDoubleMatrix(5 tot_num-1 mxREAL);
po = (double *)mxGetPr(array_out);
j = -1;
cNr = 1;
for (index=0; index a[++j]=*pr++;
t[j]=*pt++;
while ( (j >= 2) && (fabs(a[j-1]-a[j-2]) <= fabs(a[j]-a[j-1])) ) {
ampl=fabs( (a[j-1]-a[j-2])/2 );
switch(j)
{
case 0: { break; }
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 34694 2010-04-03 18:44 index.html
文件 1335 2010-04-04 13:31 license.txt
文件 6565 2009-11-10 21:49 rainflow.c
文件 926 2003-10-24 18:00 rainflow.m
文件 9216 2009-11-10 22:00 rainflow.mexw32
文件 11264 2010-03-17 18:20 rainflow.mexw64
文件 2663 2009-11-11 21:17 rfdemo1.m
文件 896 2005-01-12 19:13 rfdemo2.m
文件 2017 2009-11-11 03:43 rfhist.m
文件 3227 2009-11-10 22:46 rfmatrix.m
文件 17849 2003-10-24 18:21 rfmatrix.png
文件 3162 2009-11-11 03:41 sig2ext.m
- 上一篇:弗洛伊德 算法matlab
- 下一篇:hdb3编码解码的matlab编码
相关资源
- Pattern Recognition and Machine Learning(高清
- MATLAB 编程 第二版 Stephen J. Chapman 著
- 均值滤波和FFT频谱分析Matlab代码
- 《MATLAB扩展编程》代码
- HDB3码、AMI码的MATLAB实现
- 3点GPS定位MATLAB仿真
- MATLAB数字信号处理85个实用案例精讲入
- matlab从入门到精通pdf94795
- 欧拉放大论文及matlab代码
- 跳一跳辅助_matlab版本
- 全面详解LTE MATLAB建模、仿真与实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- MATLAB Programming for Engineers 4th - Chapman
- matlab 各种谱分析对比
- 分数阶chen混沌matlab程序
- 基于粒子群算法的非合作博弈的matl
- MATLAB车流仿真 包括跟驰、延误
- matlab空间桁架计算程序
- 基于MATLAB的图像特征点匹配和筛选
- DMA-TVP-FAVAR
- GPS信号的码捕获matlab代码.7z
- 一维光子晶体MATLAB仿真代码吸收率折
- newmark法源程序
- 传统关联成像、计算鬼成像matlab
- pri传统分选算法
- 摆动滚子推杆盘形凸轮设计
- 医学图像重建作业matlab源码
- Matlab实现混沌系统的控制
- 检测疲劳驾驶
- Matlab锁相环仿真-Phase Locked Loop.rar
评论
共有 条评论