Short version: copy a list of Matlab script/function files from wherever Matlab finds them into a particular directory ('C:\TEMP\behav\')
Long version:
if 0,
mfiles={'bh_plot_session','rsbs_prepare_formodel','rsbs_speed_stats_extra','resscn_prepare_formodel','speed_stats_extra'}
savedir = 'C:\TEMP\behav\';
if ~isdir(savedir),mkdir(savedir);end
for i=1:length(mfiles),
src=which([mfiles{i},'.m']);
[x,y,z]=fileparts(src)
dst=[savedir,'\',y,z]
copyfile(src,dst);
end
end
1 Comment
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/622718-what-is-this-code-doing#comment_1080513
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/622718-what-is-this-code-doing#comment_1080513
Sign in to comment.