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

📄 choose_path_and_file.m

📁 用于自定义文件的路径和分类显示特定类型的文件菜单
💻 M
字号:
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % A very useful menu generator for a certain type of files
 % By using this program, you can choose the path, and the file you want to
 % run. 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

path = uigetdir;% Choose path
  string = [path '\'];% 
  dirname = string;
dir_names = what(dirname);% find all the files under the certain path
matfiles = dir_names.mat;%choose all the MAT files
Savedname=[]


cd (dirname)% enter the path
INPUT1 = menu('Please select your .mat file', matfiles{1:end}, 'CANCEL');% show the mat files menu
 if INPUT1 ~= (length(matfiles) + 1) % if the customer not equal to the "Cancel", the system will choose the run the selected files.
            Filename = matfiles{INPUT1};
          disp('#############################################');
            disp(['Begin to load ' Filename ' into workspace...']);
        else
            close all; % if choose to cancel the file, the system will be closed
 end

⌨️ 快捷键说明

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