view default_struct.m @ 674:dd84b8862aa8 feature/poroelastic

First implementation of elastic dilation variable. Constant coeff is stable.
author Martin Almquist <malmquist@stanford.edu>
date Tue, 16 Jan 2018 17:41:55 -0800
parents 46256fffa329
children
line wrap: on
line source

function default_struct(s, val)
    if evalin('caller',sprintf('~exist(''%s'',''var'')',s))
        given = [];
    else
        given = evalin('caller', s);
    end

    final = copyWithDefault(given, val);
    assignin('caller', s, final);
end