close all
clc
path = ‘C:\MATLAB\ssss\LSame_Conce’;
list = dir([path,’*.dat’]);fileNames = {list.name};
for i = 1:length(fileNames)
data_in = load(‘fileNames{i}’);
%————————数据处理——————————————————————
D = data_in(:,[1 2]);
hmax = length(D);
y = D(:,1);
x = D(:,2);%————————数据处理——————————————————————%
figure
set(gcf,‘Position’,[100 100 1000 1000]);
set(gca,‘Position’,[0.1 0.1 0.8 0.8]);
plot(x,y,‘b’,‘linewidth’,1);
ax = gca;
ax.XAxisLocation = ‘origin’;
ax.YAxisLocation = ‘origin’;
xlabel(‘位移(mm)’,‘fontname’,‘微软雅黑’,‘fontsize’,14,‘FontWeight’,‘bold’,‘Color’,‘r’);
ylabel(‘荷载(kN)’,‘fontname’,‘微软雅黑’,‘fontsize’,14,‘FontWeight’,‘bold’,‘Color’,‘r’);
title([fileNames{i} ‘荷载位移曲线’],‘fontsize’,18,‘fontweight’,‘bold’,‘fontname’,‘微软雅黑’,‘Color’,‘r’);
pause(2);%————————存图————————————————
mkdir dat_image;
filepath = pwd;
cd(‘dat_image’);
saveas(gcf,[fileNames{i} ‘.png’]);
cd(filepath);
end;
close;
matalb laod时无法读取文件
最新推荐文章于 2023-01-09 17:08:24 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)