view default_field.m @ 150:d5a794c734bc feature/grids

Starting branch for adding abstract classes for grids, grid functions as well as implementing plotting and error calculation for these.
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 21 Dec 2015 15:06:16 +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