Multiget - get multiple values from multiple handle objects

MULTIGET is a small twik to get your values out of vector objects in handles

You are now following this Submission

In order to get values from handles in another order or to get multiple values from multiple handles at the same time, I created a very comfortable function that expand the GET function abilities.

MULTIGET input:

hObjects - array of object handles - is a must.

Optional:

properties - cell array of properties - every cell can fit
more than properties to extract from every object in hObjects.
default: properties={'position' 'position' ... } in the
same size of hObjects

indices - for more than one property, has to be the same size as 'properties' cell-wise.

MULTIGET returns a cell array of values by the order entered to the input

Example:

acts the same as get for all of its actions.
h=figure
c=multiget(h)

c=multiget(h,{'position','PaperSize'})

can extract certain values from vectors
(this is the reason I built the function)

c=multiget(a,{'position'},{[3]})

c=multiget(h,{'position','PaperSize'},{[1 4],[2]})


If same properties needed:
h(1)=figure
h(2)=figure

c=getscalar(h,'properties',['position','PaperSize'],,'positions',[3,1]);

If other properties needed:
h(1)=figure
h(2)=figure
c= multiget(h(1),{'position','PaperSize'},{[1 4],[2]},h(2),'position',[3])

if 2D cell2mat(C) will bring an array of values

This function needs some more work to enhance flexibility and cases
but for now its good enough for me,
enjoy,

Programmed by Yaron Meiner
Let the sun never blind your eyes.

Cite As

Yaron Meiner (2026). Multiget - get multiple values from multiple handle objects (https://www.mathworks.com/matlabcentral/fileexchange/26138-multiget-get-multiple-values-from-multiple-handle-objects), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Graphics Objects in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0