setdefv.m
author A.M. Thurnherr <athurnherr@yahoo.com>
Fri, 04 Sep 2015 06:37:43 +0000
changeset 17 f5a63c03d9c8
parent 0 0a450563f904
permissions -rw-r--r--
DoMORE-2

function d=setdefv(d,n,v)
% function d=setdefv(d,n,v)
% if variable (n) does not exist in field (d) set it to (v)
if existf(d,n)~=1
 eval(['d.',n,'=v;'])
end