Code covered by the BSD License  

Highlights from
Property grid using JIDE implementation

image thumbnail

Property grid using JIDE implementation



A graphical user control based on the JIDE PropertyGrid that mimics MatLab's property inspector.

arrayfilter(fun, array)
% Filter elements of array that meet a condition.

% Copyright 2010 Levente Hunyadi
function array = arrayfilter(fun, array)

validateattributes(fun, {'function_handle'}, {'scalar'});

if isobject(array)
    filter = false(size(array));
    for k = 1 : numel(filter)
        filter(k) = fun(array(k));
    filter = arrayfun(fun, array);  % logical indicator array of elements that satisfy condition
array = array(filter);          % array of elements that meet condition

Contact us