diff --git a/interfaces/matlab/toolbox/@ReactorNet/ReactorNet.m b/interfaces/matlab/toolbox/@ReactorNet/ReactorNet.m index 90cbccf14..15c7f8d33 100644 --- a/interfaces/matlab/toolbox/@ReactorNet/ReactorNet.m +++ b/interfaces/matlab/toolbox/@ReactorNet/ReactorNet.m @@ -9,6 +9,11 @@ else error('wrong number of arguments to ReactorNet constructor'); end +if isa(reactors, 'Reactor') + % Allow simpler syntax for creating a network with one reactor + reactors = {reactors}; +end + x.index = reactornetmethods(0,0); if x.index < 0 error(geterr); @@ -20,7 +25,3 @@ nr = length(reactors); for i = 1:nr addReactor(x,reactors{i}); end - - - -