view default_arg.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 48b6fb693025
children
line wrap: on
line source

function default_arg(s, val)
    if evalin('caller',sprintf('~exist(''%s'',''var'') || isempty(%s)',s,s))
        assignin('caller',s,val)
    end
end