%% 输出及读取多个文件
% filepath='D:\new\';
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 输出多个文件
t_start = 1; % start time
t_end = 100; % ending time min
arr_rate = 50; % data arrival rate at HAP*******
for k=1:5
M = int2str(k);
N = '.txt.';
L = './';
output = [L M N];
arr_sample = Fun_proc_sample(arr_rate,t_end);
fid = fopen(output, 'w')
fprintf(fid,'%g\t',arr_sample);
fclose(fid);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 读取多个文件
for j=1:5
M = int2str(j);
N = '.txt.';
L = './';
filename = [L M N];
x(j,:)=load(filename);
end
x
在matlab中输出、读取多个文件
最新推荐文章于 2024-08-23 16:41:03 发布