view default_struct.m @ 504:7fe1782d5224 feature/quantumTriangles

Removed the expint which ises the package expode
author Ylva Rydin <ylva.rydin@telia.com>
date Thu, 18 May 2017 11:43:35 +0200
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