view default_arg.m @ 348:145b3b8c1e4e martin-thesis-plots

Played around with Ti show and plot settings to create pretty pics for thesis.
author Martin Almquist <martin.almquist@it.uu.se>
date Sat, 03 Dec 2016 23:00:44 +0100
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