Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [V, Nc] = cell_to_mat(Vc) 0002 % 0003 % Copyright (C) 2011, ATR All Rights Reserved. 0004 % License : New BSD License(see VBMEG_LICENSE.txt) 0005 0006 if iscell(Vc), 0007 NC = length(Vc); 0008 Nc = zeros(NC,1); 0009 0010 for n=1:NC 0011 Nc(n) = size(Vc{n},1); 0012 end 0013 0014 Npoint = sum(Nc); 0015 V = zeros(Npoint, size(Vc{1},2)); 0016 jst = 0; 0017 0018 for n=1:NC 0019 j1 = jst+1; 0020 j2 = jst+Nc(n); 0021 V(j1:j2,:) = Vc{n}; 0022 jst = jst + Nc(n); 0023 end 0024 else 0025 V = Vc; 0026 Nc = size(V,1); 0027 end