Matlab matrix with different Row Sizes -
i create matrix has different row sizes i'm not sure start.
i have function produces time signatures of 5000 photons. not photons produce meaningful time signatures. function discards signatures. iterate on function 5000 times means column vector have varying sizes on each iteration never more 5000.
function photon_fwhm = processfates(string,num) = 1:num fates = 'fates'; str = int2str(i); filename = strcat(fates,str); timestamp = timestamp(filename); if timestamp == 0 continue; end; photon_timestamps(:,i) = timestamp; end;
all in have 5000 columns number of rows vary column. i'm not sure solution is.
you try using cell arrays. cell arrays may little slower, can job.
photon_timestamps{i} = vector;
then each element photon_timestamps{i} can of different size.
also block
if timestamp == 0 continue; end;
needs else part right?
Comments
Post a Comment