A=F0X; %导入柔度差矩阵
%第一次按列差分
for i=2:22;
for j=1:23;
l(i+1,i)=sqrt(sum(A(i+1,j)-A(i,j))^2); %后差分行距
l(i-1,i)=sqrt(sum(A(i-1,j)-A(i,j))^2); %前差分行距
l(i-1,i+1)=sqrt(sum(A(i-1,j)-A(i+1,j))^2); %隔行行距
CF(i-1,j)=(2.*l(i+1,i).*(A(i+1,j)-A(i,j))-2.*l(i-1,i).*(A(i,j)-A(i-1,j)))/(l(i+1,i).*l(i-1,i).*l(i-1,i+1)); %第一次按列差分
end
end
%第二次按行差分
for j=2:22;
for i=1:21;
l(j+1,j)=sqrt(sum(CF(i,j+1)-CF(i,j))^2); %后差分列距
l(j-1,j)=sqrt(sum(CF(i,j-1)-CF(i,j))^2); %前差分列距
l(j-1,j+1)=sqrt(sum(CF(i,j-1)-CF(i,j+1))^2); %隔列列距
CCF(i,j-1)=(2.*l(j+1,j).*(CF(i,j+1)-CF(i,j))-2.*l(j-1,j).*(CF(i,j)-CF(i,j-1)))/(l(j+1,j).*l(j-1,j).*l(j-1,j+1)); %计算差分两次后的曲率矩阵
end
end
%提取CCF的对角元素
FCMD=abs(diag(CCF))
%画出FCMD值按划分点顺序的平面图
plot(FCMD,':b+');
title('柔度差曲率矩阵损伤识别图');
xlabel('划分点标号');
ylabel('损伤指标值'); |