www.pudn.com > snippets(1).rar > write_features.m, change:2009-10-12,size:465b


function write_features(names,ctr,form,flow,fpseq,ftype,num)

  % find directory path of experiment
  examplename = names{1}{1};
  slashes = find(examplename=='/');
  prefix = examplename(1:slashes(end));

  % write to file
  if strcmp(ftype,'train')
    filename = [prefix 'train_features_' sprintf('%.2d.fr%.2d',ctr,num) '.mat'];
  else
    filename = [prefix 'test_features_' sprintf('%.2d.fr%.2d',ctr,num) '.mat'];
  end
  save(filename,'form','flow','fpseq');