资源简介
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编码
相关资源
- 四旋翼MATLAB仿真文件+实验报告
- 串行级联cpm系统MATLAB仿真
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
评论
共有 条评论