Skip to content

Instantly share code, notes, and snippets.

View wwarriner's full-sized avatar

William Warriner wwarriner

  • University of Alabama at Birmingham
  • Birmingham, AL
View GitHub Profile

The properties function of MATLAB dynamicprops handle classes is not returned in sorted order, and isn't even self-consistent. Multiple class initializations followed by clear classes can return different orders each time. Since R2018b (and maybe earlier) one can do the following to return properties in sorted order.

Add public overrides for properties and fieldnames like below. Technically properties() isn't a method of handle dynamicprops, but this should still work because methods are called before built-ins (https://www.mathworks.com/help/matlab/matlab_prog/function-precedence-order.html).

function value = properties( obj )
    if nargout == 0
        disp( builtin( "properties", obj ) );
    else
        value = sort( builtin( "properties", obj ) );
@wwarriner
wwarriner / List_of_ENV_in_Windows.md
Created January 22, 2020 15:48 — forked from pkfrom/List_of_ENV_in_Windows.md
List of Environment Variables in Windows Operating System.

List of Environment Variables in Windows Operating System

Windows XP Environment Variables

Environment Variable Path
%ALLUSERSPROFILE% C:\Documents and Settings\All Users
%APPDATA% C:\Documents and Settings{username}\Application Data
%COMMONPROGRAMFILES% C:\Program Files\Common Files
%COMMONPROGRAMFILES(x86)% C:\Program Files (x86)\Common Files
@wwarriner
wwarriner / dask_image_watershed.ipynb
Last active November 26, 2019 20:08
First attempt at distributed watershed
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.