Filter löschen
Filter löschen

save a data as mat file

1 Ansicht (letzte 30 Tage)
Rica
Rica am 6 Nov. 2012
i have this code:
%
if true
% code
%
for i=113:113
data=[];
fileID = fopen(['Printout_' num2str(i) '.txt']);
block = textscan(fileID, '%s','Delimiter','\n');
data=[data; block];
fclose(fileID);
compact_data=vertcat(data{:});
compact_data(1:29:end)=[];
compact_data(1:28:end)=[];
result_file=fopen(['result_probe_' num2str(i) '.txt'],'w');
fprintf(result_file,'%s\r\n',compact_data{1:1:end});
clear all
end
end code
I want to save the compact data as mat-file. that means i dont want to save it as text file (fprint.....)
I hope you could help me
thanks

Akzeptierte Antwort

Kye Taylor
Kye Taylor am 6 Nov. 2012
try
save yourMatFile.mat compact_data

Weitere Antworten (0)

Kategorien

Mehr zu Large Files and Big Data finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by