load current for creating movie load parameters id.I_from : start vertex index id.I_to : end vertex index 2014-11-10 Masa-aki Sato 2017-12-12 Yusuke Takeda Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function [Z, I] = movie_current_load(id, p) 0002 % load current for creating movie 0003 % 0004 % load parameters 0005 % id.I_from : start vertex index 0006 % id.I_to : end vertex index 0007 % 0008 % 2014-11-10 Masa-aki Sato 0009 % 2017-12-12 Yusuke Takeda 0010 % 0011 % Copyright (C) 2011, ATR All Rights Reserved. 0012 % License : New BSD License(see VBMEG_LICENSE.txt) 0013 0014 0015 load(p.curr_file, 'Z', 'ix_roi') 0016 0017 % Convert from-index to index of Z 0018 NP = length(ix_roi); 0019 NM = max([ix_roi(:); id.I_from(:)]); 0020 ID = zeros(NM,1); 0021 0022 % index convert table 0023 ID(ix_roi) = 1:NP; 0024 0025 % convert from-index to index of Z 0026 I_from = ID(id.I_from); 0027 0028 % exclude index outside of ix_roi 0029 I = find(I_from > 0); 0030 0031 Z = Z(I_from(I),:); 0032 0033 if length(I) < length(I_from), 0034 fprintf('There are mismatch between ix_roi and Index_from!!\n\n') 0035 end 0036 0037