⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ctf_folder.m

📁 读取CTF脑磁图数据的Matlab代码
💻 M
字号:
function [ctf] = ctf_folder(folder,ctf);% ctf_folder - get and check CTF .ds folder name%% [ctf] = ctf_folder( [folder], [ctf] );% % folder:  The .ds directory of the dataset.  It should be a complete path% or given relative to the current working directory (given by pwd).  The% returned value will ensure the complete path is identified.  If this% argument is empty or not given, a graphical prompt for the folder% appears.%% eg,%     ctf = ctf_folder;% % ctf.folder is returned (as a complete path).%%      <>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> %%      <                                                      > %  %      <                    DISCLAIMER:                       > %%      <                                                      > %%      < THIS PROGRAM IS INTENDED FOR RESEARCH PURPOSES ONLY. > %%      < THIS PROGRAM IS IN NO WAY INTENDED FOR CLINICAL OR   > %%      <                    OFFICIAL USE.                     > %%      <                                                      > %%      <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<> %%% $Revision: 1.2 $ $Date: 2004/01/30 06:49:39 $% Licence:  GNU GPL, no express or implied warranties% Modified: 01/2004, Darren.Weber_at_radiology.ucsf.edu%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%if ~exist('folder','var'), folder = getfolder; endif isempty(folder),        folder = getfolder; endif exist(folder) ~= 7,  fprintf('...folder is not a directory\n');  folder = getfolder;endctf.folder = folder;% ensure we get the folder pathcurrent_dir = pwd;cd(ctf.folder);cd ..folderPath = pwd;cd(current_dir);% check whether the folder path is in the folder alreadyif findstr(folderPath,ctf.folder),  % OK the path is already in the folderelse  % Add the folderPath  ctf.folder = [ctf.folderPath,filesep,ctf.folder];  ctf.folder = strrep(ctf.folder,[filesep,filesep],filesep);endreturn%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function folder = getfolder,folder = uigetdir(pwd,'locate CTF .ds folder');if ~folder,  error('no folder specified');endreturn

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -