function [] = combinetrainingset(list,pathsave)
% COMBINETRAININGSET Combine training sets into one larger training set
%
%   COMBINETRAININGSET(LIST,PATHSAVE) combines the training sets in the cell
%   array LIST and saves them as a new file with pathname PATHSAVE.
%
%   See also trainclassifycells, selectclassifycells, classifycells
% 	=======================================================================================
% 	CELLSEGM: Cell segmentation, Version 2012
% 	Copyright (c): Erlend Hodneland
%   Jonas Lies Vei 91,
%   5009 Bergen
%   Email: erlend.hodneland@biomed.uib.no
% 	=======================================================================================

cellv = [];
pathname = [];
for i = 1 : numel(list)
    namehere = list{i};
    D = load(namehere);
    
    cellv = [cellv ; cell2mat(D.cellv{i}')];
    pathname = [pathname ; D.pathname];
    
    
end;
save(pathsave,'cellv','pathname');


