File slection app for Matlab

versión 1.2 (51.9 KB) por ytzhak goussha
Integrate the file selection app into any Matlab app

17 descargas

Actualizada 16 May 2022

De GitHub

Ver licencia en GitHub

file_slection_app_for_matlab

Integrate the file selection app into any Matlab app or use this app as a stand-alone file selector and export the data to the workspace.

Installation:

  • Download and unzip the file
  • Add app folder to Matlab path

Getting started:

Stand alone app:

You can use the app as a stand-alone app as a file selector: Pass the command:

FileSelectorApp

If Matlab doesn't recognize the function (Unrecognized function or variable 'FileSelectorApp'.), then make sure that you added the app to the Matlab path

Integrate app into other apps:

  1. Open the app into which you wish to integrate the FileSelectorApp with the app designer
  2. Add a public property image
  3. Past the next line in place of the new property This new property has three fields: a. file_list : table with two columns - filenames and variableind (which hold the index of a specific variable, relevant for mat files) b. valid_flag: boolean - true if the app successfully loaded files c. last_source_folder: char - the path to the last loaded folder so that next time it will load that folder automatically image
 app_output = struct('file_list',[],'valid_flag',false, 'last_source_folder','') % Connect handle to outer app here 
  1. Add a function (private or public), and copy-past the next lines: image
h = FileSelectorApp(app); 
waitfor(h); % This will freeze you app until the FileSelectorApp is closed
% Debug
%    disp(app.file_selector)

Uncomment the last line to debug or display the values.

  1. The property app_output will hold a table with the selected file paths

How to use

image

A. Filter parameters:

  1. "Matfile" StateButton and "Class name" field: If "Matfile" StateButton "On," then the app will load only the matfile that contains a variable of the class in the "Class name" field (double if empty). Here is where the 'variableind' variable in the 'file_list' table in the 'app_output' property is useful; it indicates the index of the variable in the matfile (the first one if there is more than one)
  2. "Search filter": Add a search filter to refine the loaded file, for example, "*.wav" to load only wav files or "June" to load the only files that contain the word "June."

B. Load files

  1. "Select folder" button: Open folder selection UI and load files from the folder
  2. "Include subfolder" StateButton: If "On" the extended search to subfolder as well, (effectively adds "**\" to the search filter)
  3. "Refresh folder" button: Reload the folder

C. Select files

The loaded files will be shown in the left table, select any number of files and transfer them to the select list on the right

D. Export file list

If the app was initiated as a stand-alone app, this action exports the table to the workspace and closes the app. If the app was initiated as an integrated element in another app, this action will update the app.app_output handle and close the app.

View File slection app for Matlab on File Exchange

Citar como

ytzhak goussha (2022). File slection app for Matlab (https://github.com/gutzcha/file_selection_app_for_matlab/releases/tag/v1.2), GitHub. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2022a
Compatible con la versión R2018a y siguientes
Compatibilidad con las plataformas
Windows macOS Linux
Etiquetas Añadir etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Para consultar o informar de algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.
Para consultar o informar de algún problema sobre este complemento de GitHub, visite el repositorio de GitHub.