Recent changes to handling of adaptive objects (c.f., ca6c17b) cause direct assignment of an adaptive object to a parameter to fail for designs with multiple factors. See for example demos/behaviorDemo.m on the current master branch (c.f., 6c7aa72).
This is because design.addAdaptive() calls design.subsasgn() with a linear index into .conditions, but design.subsasgn() does not currently handle linear indices.
I think there are two possible solutions here:
Modify design.addAdaptive() to pass subscripts (rather than linear indices) in it's call to design.subsasgn(), or
Modify design.subsasgn() to accept linear indices in assignments to .conditions.
This change implements the second option.
Is there any reason that linear indices should not be allowed in assignments to .conditions?
Recent changes to handling of adaptive objects (c.f., ca6c17b) cause direct assignment of an adaptive object to a parameter to fail for designs with multiple factors. See for example demos/behaviorDemo.m on the current master branch (c.f., 6c7aa72).
This is because
design.addAdaptive()
callsdesign.subsasgn()
with a linear index into.conditions
, butdesign.subsasgn()
does not currently handle linear indices.I think there are two possible solutions here:
design.addAdaptive()
to pass subscripts (rather than linear indices) in it's call todesign.subsasgn()
, ordesign.subsasgn()
to accept linear indices in assignments to.conditions
.This change implements the second option.
Is there any reason that linear indices should not be allowed in assignments to
.conditions
?