view default_field.m @ 380:280ae4dbf93b feature/beams

CdiffImplicit: Fixed a bug. Switched to LU.
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 12 Dec 2016 11:35:23 +0100
parents 14bf01b7a068
children 50cafc4b9e40
line wrap: on
line source

function default_field(s, f, val)
    if isfield(s,f)
        return
    end
    s.(f) = val;
    assignin('caller', inputname(1),s);
end