[Matlab/Samples] Fix broken default argument checks

There are no classes named 'GasMix' or (lowercase) 'solution', so these checks
would always fail and the input argument would always be silently ignored.
This commit is contained in:
Ray Speth 2014-06-16 22:01:13 +00:00
parent 6c3fdb7963
commit 049c9a1960
10 changed files with 10 additions and 10 deletions

View file

@ -6,7 +6,7 @@ function equil(g)
% equivalence ratio.
help equil;
if nargin == 1 & isa(g,'GasMix')
if nargin == 1
gas = g;
else
gas = IdealGasMix('gri30.cti');

View file

@ -8,7 +8,7 @@ function plotdata = ignite(g)
help ignite
if nargin == 1 & isa(g,'solution')
if nargin == 1
gas = g;
else
gas = IdealGasMix('gri30.xml');

View file

@ -5,7 +5,7 @@ function ignite_hp(gas)
help ignite_hp
if nargin == 0 | ~isa(gas,'GasMix')
if nargin == 0
gas = IdealGasMix('gri30.xml');
end

View file

@ -4,7 +4,7 @@ function ignite_uv(gas)
%
help ignite_uv
if nargin == 0 | ~isa(gas,'GasMix')
if nargin == 0
gas = IdealGasMix('gri30.xml');
end

View file

@ -6,7 +6,7 @@ function isentropic(g)
%
help isentropic
if nargin == 1 & isa(g,'solution')
if nargin == 1
gas = g;
else
gas = IdealGasMix('gri30.xml');

View file

@ -7,7 +7,7 @@ function prandtl1(g)
%
help prandtl1
if nargin == 1 & isa(g,'solution')
if nargin == 1
gas = g;
else
gas = GRI30('Mix');

View file

@ -6,7 +6,7 @@ function prandtl2(g)
%
help prandtl2
if nargin == 1 & isa(g,'solution')
if nargin == 1
gas = g;
else
gas = GRI30('Multi');

View file

@ -12,7 +12,7 @@ function reactor1(g)
help reactor1
if nargin == 1 & isa(g,'solution')
if nargin == 1
gas = g;
else
gas = GRI30;

View file

@ -8,7 +8,7 @@ function reactor2(g)
help reactor2
if nargin == 1 & isa(g,'solution')
if nargin == 1
gas = g;
else
gas = GRI30;

View file

@ -3,7 +3,7 @@ function transport1(g)
%
help transport1
if nargin == 1 & isa(g,'GasMix')
if nargin == 1
gas = g;
else
gas = GRI30('Mix');