Home > vbmeg > demo > tutorial_for_vbmeg2 > advanced > prepare_input_for_movie.m

prepare_input_for_movie

PURPOSE ^

Prepare the following variables for creating movie

SYNOPSIS ^

function prepare_input_for_movie(p)

DESCRIPTION ^

 Prepare the following variables for creating movie
   * ROI-current (Z)
   * Place of ROI (ix_roi)
   * Time label (time)
   * Sampling rate (sampling_rate)
   * Interaction between ROIs (B)

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function prepare_input_for_movie(p)
0002 % Prepare the following variables for creating movie
0003 %   * ROI-current (Z)
0004 %   * Place of ROI (ix_roi)
0005 %   * Time label (time)
0006 %   * Sampling rate (sampling_rate)
0007 %   * Interaction between ROIs (B)
0008 %
0009 % Copyright (C) 2011, ATR All Rights Reserved.
0010 % License : New BSD License(see VBMEG_LICENSE.txt)
0011 
0012 disp(mfilename);
0013 
0014 save_dir = fullfile(p.proj_root, p.dynamics_dirname, p.input_for_movie_dirname);
0015 if exist(save_dir, 'dir') ~= 7
0016     mkdir(save_dir)
0017 end
0018 
0019 for ta = 1:length(p.task_list)
0020     % Load ROI-current, place of ROI, time label, and sampling rate
0021     current_file = fullfile(p.proj_root, p.dynamics_dirname, p.roi_current_dirname, [p.task_list{ta} '.mat']);
0022     load(current_file, 'Z', 'ix_roi', 'time', 'sampling_rate')
0023     
0024     % Load interaction between ROIs
0025     dynamics_file = fullfile(p.proj_root, p.dynamics_dirname, p.dynamics_model_dirname, [p.task_list{ta} '.lcd.mat']);
0026     load(dynamics_file, 'B')
0027     
0028     % Save file
0029     save(fullfile(save_dir, [p.task_list{ta} '.mat']), 'Z', 'ix_roi', 'time',...
0030         'sampling_rate', 'B')
0031 end
0032

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005