view default_field.m @ 1091:b4054942e277 feature/dataspline

Rewrite dataSpline() avoiding the spline function in Curve and using fnder for the differentiation
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 05 Apr 2019 10:17:04 +0200
parents d1c13505182a
children
line wrap: on
line source

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