view default_struct.m @ 938:97291e1bd57c feature/utux2D

Make LaplCurv send only number of grid points to InterpOpsXX. Remove coordinates from get_boundary_ops method.
author Martin Almquist <malmquist@stanford.edu>
date Tue, 04 Dec 2018 14:07:38 -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