view default_struct.m @ 1276:bc2be302df90 feature/poroelastic

Fix typos in comments
author Martin Almquist <malmquist@stanford.edu>
date Sun, 07 Jun 2020 11:22:29 -0700
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