1. Cell array can stores different length of feature in various sample. Which is no possible using matrix.
myCell = cell(5,1);
myCell{1} = nonzeroPos; % first row
myCell{2} = [ 3 4 5]; % second row
2. Store / write cell array into file
C = cell(noSample,1);
fid=fopen(fNameFreq,'wt');
for i=1: (noSample - noSample +2 )
nonzeroPos = find(data(i , :) );
C{i} = nonzeroPos;
fprintf(fid,'%i\t',C{i});
fprintf(fid,'\n','' );
end
fclose(fid);
Comments
Post a Comment