============== TEXTSCAN=================
fid = fopen('magic04.data','r');
raw_data = textscan(fd,'%f %f %f %f %f %f %f %f %f %f %c','delimiter',',');
data = [raw_data{1:10}];
class = raw_data{11};
fclose(fid);
============== FGETL , FPRINTF =================
fid = fopen('positive.seq','r');
fidTrain = fopen('randomTrain.seq','w');
tline = fgetl(fid);
while ischar(tline)
disp(tline);
fprintf(fidTrain ,'%s\n',upper(tline));
tline = fgetl(fid);
end
fclose(fidTrain );
fclose(fid);
Comments
Post a Comment