Plots histogram of the distance between nearest vertices. Usage - vb_job_plot_verdist(brainfile) Input parameters - brainfile: VBMEG brain file (.brain.mat) Input parameters (optional) Output parameters Example >> brainfile = './TY/data/TY.brain.mat'; >> vb_job_plot_verdist(brainfile); History - 2006-08-11 Taku Yoshioka 2011-06-20 taku-y [minor] Progress message was added. Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function vb_job_plot_verdist(brainfile) 0002 % Plots histogram of the distance between nearest vertices. 0003 % 0004 % Usage 0005 % - vb_job_plot_verdist(brainfile) 0006 % 0007 % Input parameters 0008 % - brainfile: VBMEG brain file (.brain.mat) 0009 % 0010 % Input parameters (optional) 0011 % 0012 % Output parameters 0013 % 0014 % Example 0015 % >> brainfile = './TY/data/TY.brain.mat'; 0016 % >> vb_job_plot_verdist(brainfile); 0017 % 0018 % History 0019 % - 2006-08-11 Taku Yoshioka 0020 % 2011-06-20 taku-y 0021 % [minor] Progress message was added. 0022 % 0023 % Copyright (C) 2011, ATR All Rights Reserved. 0024 % License : New BSD License(see VBMEG_LICENSE.txt) 0025 0026 load(brainfile,'xxD'); 0027 0028 k = 0; 0029 for i=1:length(xxD) 0030 k = k+length(xxD{i}); 0031 end 0032 0033 data = zeros(k,1); 0034 k = 1; 0035 h = waitbar(0,'Distance data collection'); 0036 prg = 0; 0037 prg_all = length(xxD); 0038 vb_disp_nonl(sprintf('%3d %% processed',ceil(100*(prg/prg_all)))); 0039 0040 for i=1:length(xxD) 0041 for j=1:length(xxD{i}) 0042 data(k) = xxD{i}(j)*1000; 0043 k = k+1; 0044 end 0045 0046 waitbar(i/length(xxD),h); 0047 for ii=1:15; vb_disp_nonl(sprintf('\b')); end 0048 vb_disp_nonl(sprintf('%3d %% processed',ceil(100*(prg/prg_all)))); 0049 prg = prg+1; 0050 end 0051 0052 close(h); 0053 vb_disp_nonl(sprintf('\n')); 0054 0055 hist(data,40); 0056 xlabel('Distance between nearest vertices [mm]'); 0057 ylabel('Frequency'); 0058 0059 return;