Mercurial > forge
changeset 2636:d425be1bdc29 octave-forge
fix bug with scalar parameters
author | mcreel |
---|---|
date | Mon, 09 Oct 2006 14:26:21 +0000 |
parents | 95951526b7b2 |
children | 0e554b247bbd |
files | main/optim/src/samin.cc |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/main/optim/src/samin.cc Mon Oct 09 12:23:09 2006 +0000 +++ b/main/optim/src/samin.cc Mon Oct 09 14:26:21 2006 +0000 @@ -76,7 +76,7 @@ } // now check type of each element of control - if (!(control(0).is_real_matrix()) || (control(0).is_real_scalar())) { + if (!(control(0).is_real_matrix()) && !(control(0).is_real_scalar())) { error("samin: 1st element of controls must be LB: a vector of lower bounds"); return true; } @@ -86,7 +86,7 @@ return true; } - if (!(control(1).is_real_matrix()) || (control(1).is_real_scalar())) { + if (!(control(1).is_real_matrix()) && !(control(1).is_real_scalar())) { error("samin: 1st element of controls must be UB: a vector of lower bounds"); return true; }