view default_field.m @ 666:2d85f17a8aec feature/utux2D

Add possibility for damping terms at interpolation interface.
author Martin Almquist <malmquist@stanford.edu>
date Mon, 16 Oct 2017 21:56:12 -0700
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