From 049c9a19609a1646a04870b1873f1559918b988d Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 16 Jun 2014 22:01:13 +0000 Subject: [PATCH] [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. --- samples/matlab/equil.m | 2 +- samples/matlab/ignite.m | 2 +- samples/matlab/ignite_hp.m | 2 +- samples/matlab/ignite_uv.m | 2 +- samples/matlab/isentropic.m | 2 +- samples/matlab/prandtl1.m | 2 +- samples/matlab/prandtl2.m | 2 +- samples/matlab/reactor1.m | 2 +- samples/matlab/reactor2.m | 2 +- samples/matlab/transport1.m | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/samples/matlab/equil.m b/samples/matlab/equil.m index e563cc4e5..60b288437 100644 --- a/samples/matlab/equil.m +++ b/samples/matlab/equil.m @@ -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'); diff --git a/samples/matlab/ignite.m b/samples/matlab/ignite.m index c02cf6a61..a992ef8b1 100644 --- a/samples/matlab/ignite.m +++ b/samples/matlab/ignite.m @@ -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'); diff --git a/samples/matlab/ignite_hp.m b/samples/matlab/ignite_hp.m index b38ce2282..cd7cabe0b 100644 --- a/samples/matlab/ignite_hp.m +++ b/samples/matlab/ignite_hp.m @@ -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 diff --git a/samples/matlab/ignite_uv.m b/samples/matlab/ignite_uv.m index e5a310332..f61b272e0 100644 --- a/samples/matlab/ignite_uv.m +++ b/samples/matlab/ignite_uv.m @@ -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 diff --git a/samples/matlab/isentropic.m b/samples/matlab/isentropic.m index 8854c9c9f..f74bcdbf7 100644 --- a/samples/matlab/isentropic.m +++ b/samples/matlab/isentropic.m @@ -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'); diff --git a/samples/matlab/prandtl1.m b/samples/matlab/prandtl1.m index 0a65d1662..d7533cffa 100644 --- a/samples/matlab/prandtl1.m +++ b/samples/matlab/prandtl1.m @@ -7,7 +7,7 @@ function prandtl1(g) % help prandtl1 -if nargin == 1 & isa(g,'solution') +if nargin == 1 gas = g; else gas = GRI30('Mix'); diff --git a/samples/matlab/prandtl2.m b/samples/matlab/prandtl2.m index 6e09114e9..03ca3c359 100644 --- a/samples/matlab/prandtl2.m +++ b/samples/matlab/prandtl2.m @@ -6,7 +6,7 @@ function prandtl2(g) % help prandtl2 -if nargin == 1 & isa(g,'solution') +if nargin == 1 gas = g; else gas = GRI30('Multi'); diff --git a/samples/matlab/reactor1.m b/samples/matlab/reactor1.m index 76e807d7c..26a2a958c 100644 --- a/samples/matlab/reactor1.m +++ b/samples/matlab/reactor1.m @@ -12,7 +12,7 @@ function reactor1(g) help reactor1 -if nargin == 1 & isa(g,'solution') +if nargin == 1 gas = g; else gas = GRI30; diff --git a/samples/matlab/reactor2.m b/samples/matlab/reactor2.m index e0fa9cc68..52c21ff14 100644 --- a/samples/matlab/reactor2.m +++ b/samples/matlab/reactor2.m @@ -8,7 +8,7 @@ function reactor2(g) help reactor2 -if nargin == 1 & isa(g,'solution') +if nargin == 1 gas = g; else gas = GRI30; diff --git a/samples/matlab/transport1.m b/samples/matlab/transport1.m index d186cfc15..5b6d0646b 100644 --- a/samples/matlab/transport1.m +++ b/samples/matlab/transport1.m @@ -3,7 +3,7 @@ function transport1(g) % help transport1 -if nargin == 1 & isa(g,'GasMix') +if nargin == 1 gas = g; else gas = GRI30('Mix');