Home > database > ensemble_copy_stimulus.m

ensemble_copy_stimulus

PURPOSE ^

Copies a stimulus from the location specified by the combination of

SYNOPSIS ^

function status = ensemble_copy_stimulus(stiminfo,params)

DESCRIPTION ^

 Copies a stimulus from the location specified by the combination of 
 params.stimroot and params.location to the destination directory in
 params.outpath

 Intended for use in conjunction with ensemble_processStims

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function status = ensemble_copy_stimulus(stiminfo,params)
0002 % Copies a stimulus from the location specified by the combination of
0003 % params.stimroot and params.location to the destination directory in
0004 % params.outpath
0005 %
0006 % Intended for use in conjunction with ensemble_processStims
0007 
0008 % 23Feb2013 Petr Janata
0009 
0010 
0011 status = 0;
0012 
0013 srcfname = fullfile(params.stimroot,params.location);
0014 if ~exist(srcfname,'file')
0015   fprintf('Could not locate source stimulus: %s\n', srcfname);
0016   return
0017 end
0018 
0019 [fpath,fname,fext] = fileparts(params.location);
0020 destfname = fullfile(params.outpath, [fname fext]);
0021 
0022 unix_str = sprintf('cp %s %s', srcfname, destfname);
0023 status = ~unix(unix_str);
0024 
0025 return
0026 end

Generated on Wed 22-May-2019 04:00:51 by m2html © 2003