%write
tic
file = fopen('test.binm', 'w');
a = ones(200, 10);
a = cumsum(a);
fwrite(file, a', 'double');
fclose(file);
clear a;
for i=1:100
%append
a = ones(1, 10)*i;
file = fopen('test.binm', 'a');
fwrite(file, a, 'double');
fclose(file);
clear a;
end
%read
file = fopen('test.binm', 'r');
a = fread(file,[10,300], 'double')';
fclose(file);
toc
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment