comparison +multiblock/InterfaceOptions.m @ 909:ab1759166a8c feature/utux2D

Bugfix in InterfaceOptions.setOption
author Martin Almquist <malmquist@stanford.edu>
date Fri, 23 Nov 2018 20:21:28 -0800
parents c0652621bd69
children f7306f03f77a
comparison
equal deleted inserted replaced
908:ecfccf236af0 909:ab1759166a8c
76 end 76 end
77 end 77 end
78 78
79 % Both i and j are nonempty, set property only for that interface 79 % Both i and j are nonempty, set property only for that interface
80 else 80 else
81 opts{i,j}{1} = setfield(opts{i,j}{1}, optStr, val); 81 if ~isempty(opts{i,j})
82 opts{i,j}{2} = setfield(opts{i,j}{2}, optStr, val); 82 opts{i,j}{1} = setfield(opts{i,j}{1}, optStr, val);
83 opts{i,j}{2} = setfield(opts{i,j}{2}, optStr, val);
84 elseif ~isempty(opts{j,i})
85 opts{j,i}{1} = setfield(opts{j,i}{1}, optStr, val);
86 opts{j,i}{2} = setfield(opts{j,i}{2}, optStr, val);
87 else
88 error(sprintf('Blocks %d and %d do not seem to be coupled',i,j) );
89 end
83 end 90 end
84 91
85 obj.optsCell = opts; 92 obj.optsCell = opts;
86 end 93 end
87 94