应力数据对齐并批量保存txt
clc;
clear;
a=[];
for i = 1:1:1030
a=[a;i];
x=(80/1030)*[a;i];
y= (-0.1959).*x.*x + (12.53).*x + 28.24;
filePath = strcat('C:\Users\xxx\Desktop\应力\','0', num2str(i),'.txt');
fid=fopen(filePath,'wt');
fprintf(fid,'%.4f',y(i));
fclose(fid);%关闭文件。
end