From a22db9fa22572df3be9446875607455cd3361d9e Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 13 Feb 2018 00:02:36 -0500 Subject: [PATCH] [Matlab] Check that Reactor contents are Solution objects Fix documentation error that incorrectly indicated that Mixture objects could also be used. --- interfaces/matlab/toolbox/@Reactor/Reactor.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/interfaces/matlab/toolbox/@Reactor/Reactor.m b/interfaces/matlab/toolbox/@Reactor/Reactor.m index f550336c8..a5e528953 100644 --- a/interfaces/matlab/toolbox/@Reactor/Reactor.m +++ b/interfaces/matlab/toolbox/@Reactor/Reactor.m @@ -15,8 +15,8 @@ function x = Reactor(contents, typ) % :mat:func:`IdealGasConstPressureReactor`, :mat:func:`ConstPressureReactor` % % :param contents: -% Instance of class :mat:func:`Solution` or :mat:func:`Mixture` -% representing the contents of the reactor +% Instance of class :mat:func:`Solution` representing the contents of the +% reactor % :param typ: % Integer, reactor type. Options are: % @@ -49,4 +49,6 @@ x = class(x, 'Reactor'); if isa(contents, 'Solution') insert(x, contents); +elseif ~(isa(contents, 'double') && contents == 0) + error('Reactor contents must be an object of type "Solution"') end