cantera/interfaces/matlab/toolbox/@FlowDevice/setFunction.m
Ingmar Schoegl d263566670 [Reactor] Deprecating magic numbers.
* add deprecation warning for int ReactorBase::type() (to be changed after Cantera 2.5)
 * introduce temporary std::string ReactorBase::typeStr() (to be renamed after Cantera 2.5)
 * deprecate all functions using the old call and introduce associated temporary functions
2019-08-01 15:37:48 -04:00

20 lines
522 B
Matlab

function setFunction(f, mf)
% SETFUNCTION Set the mass flow rate with class :mat:func:`Func`.
% setFunction(f, mf)
%
% See also: :mat:func:`MassFlowController`, :mat:func:`Func`
%
% :param f:
% Instance of class :mat:func:`MassFlowController`
% :param mf:
% Instance of class :mat:func:`Func`
%
if strcmp(f.type, 'MassFlowController')
k = flowdevicemethods(5, f.index, func_hndl(mf));
if k < 0
error(geterr);
end
else
error('Mass flow rate can only be set for mass flow controllers')
end