5.0

5.0 | 3 ratings Rate this file 21 Downloads (last 30 days) File Size: 7.9 KB File ID: #37679
image thumbnail

UIGETVARIABLES: Dialog to pass variables from workspace into GUI

by Scott Hirsch

 

29 Aug 2012 (Updated 01 May 2013)

UIGETVARIABLES creates a dialog box for selecting variables from the base workspace

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

It is common to write GUI-driven applications which require end users to pass in some variables from the workspace when calling the function to launch the GUI, e.g. myPlottingGUI(X,Y)

UIGETVARIABLES allows your users to interactively select workspace variables from a dialog instead of having to type variable names when launching your app. You can restrict which types of variables are allowed for each input, making it easier for users to successfully pass the right data into your app.

Give it a try and let me know what you think!

Acknowledgements

This file inspired Cascade Training Gui: Specify Ground Truth, Lens Distortion Explorer, and Volumetric Data Explorer.

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File  
Everyone's Tags
gui, pick of the week, potw, utility
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
19 Apr 2013 Adam Filion

Hi Scott,

As an enhancement request, it'd be nice if this could also return the names of the variables selected from the workspace, for use in things like labeling axes.

17 Apr 2013 Steph T

Simple, effective, and does the job very nicely! Exactly what I was looking for. thanks!

15 Nov 2012 Szilárd Németh

I was about to create an app and was exactly looking for something like this. Great one, thanks Scott!

17 Sep 2012 Adam Filion

Very useful! Thanks!

Updates
29 Aug 2012

Bug fix.

01 May 2013

New feature: Second output argument to return names of selected variables. As Adam suggests, this can be useful for doing things like labeling axes with names meaningful to your end user.

Contact us