a = rand(10,1); % 8*10=80kb
% 写入
fid = fopen('test.bin','w');
fwrite(fid,a,'double');
fclose(fid);
% 读取
fid1 = fopen('test.bin','r');
lkl = fread(fid1,'double');
fclose(fid1);
matlab写入读取二进制文件
最新推荐文章于 2024-06-28 19:44:35 发布
a = rand(10,1); % 8*10=80kb
% 写入
fid = fopen('test.bin','w');
fwrite(fid,a,'double');
fclose(fid);
% 读取
fid1 = fopen('test.bin','r');
lkl = fread(fid1,'double');
fclose(fid1);