comparison default_field.m @ 1033:037f203b9bf5 feature/burgers1d

Merge with branch feature/advectioRV to utilize the +rv package
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 17 Jan 2019 10:44:12 +0100
parents d1c13505182a
children
comparison
equal deleted inserted replaced
854:18162a0a5bb5 1033:037f203b9bf5
1 function default_field(s, f, val) 1 function default_field(s, f, val)
2 if isfield(s,f) 2 if isfield(s,f) && ~isempty(s.(f))
3 return 3 return
4 end 4 end
5 s.(f) = val; 5 s.(f) = val;
6 assignin('caller', inputname(1),s); 6 assignin('caller', inputname(1),s);
7 end 7 end