From e8cc23d3af59d9816e0830d3ff5f8305261cbdb8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Ry=C3=BBk=29?=
 <stepan@adjemian.eu>
Date: Fri, 23 Jul 2021 19:41:10 +0200
Subject: [PATCH] Bug fixes (typos).

---
 tests/solver-test-functions/helicalvalley.m | 2 +-
 tests/solver-test-functions/powell1.m       | 2 +-
 tests/solver-test-functions/powell2.m       | 2 +-
 tests/solver-test-functions/rosenbrock.m    | 2 +-
 tests/solver-test-functions/wood.m          | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/solver-test-functions/helicalvalley.m b/tests/solver-test-functions/helicalvalley.m
index c4b39bf427..a10d3bd77f 100644
--- a/tests/solver-test-functions/helicalvalley.m
+++ b/tests/solver-test-functions/helicalvalley.m
@@ -49,7 +49,7 @@ if nargin==1
         fjac(3,2) = 0;
         fjac(3,3) = 1;
     end
-elseif nargin
+elseif ~nargin
     if nargout==1
         fval = [-1; 0; 0];
     else
diff --git a/tests/solver-test-functions/powell1.m b/tests/solver-test-functions/powell1.m
index b021bf1077..4117ea7d5f 100644
--- a/tests/solver-test-functions/powell1.m
+++ b/tests/solver-test-functions/powell1.m
@@ -36,7 +36,7 @@ if nargin==1
         fjac(4,1) = 2*sqrt(10)*(x(1)-x(4));
         fjac(4,4) = -fjac(4,1);
     end
-elseif nargin
+elseif ~nargin
     if nargout==1
         fval = [3; -1; 0; 1];
     else
diff --git a/tests/solver-test-functions/powell2.m b/tests/solver-test-functions/powell2.m
index 52b5f5ba78..29c6ed9d84 100644
--- a/tests/solver-test-functions/powell2.m
+++ b/tests/solver-test-functions/powell2.m
@@ -28,7 +28,7 @@ if nargin==1
         fjac(2,1) = -exp(x(1));
         fjac(2,2) = -exp(x(2));
     end
-elseif nargin
+elseif ~nargin
     if nargout==1
         fval = [0; 1];
     else
diff --git a/tests/solver-test-functions/rosenbrock.m b/tests/solver-test-functions/rosenbrock.m
index 337fceb20f..b727eb44f8 100644
--- a/tests/solver-test-functions/rosenbrock.m
+++ b/tests/solver-test-functions/rosenbrock.m
@@ -28,7 +28,7 @@ if nargin==1
         fjac(2,1) = -20*x(1);
         fjac(2,2) = 10;
     end
-elseif nargin
+elseif ~nargin
     if nargout==1
         fval = [10000; 1];
     else
diff --git a/tests/solver-test-functions/wood.m b/tests/solver-test-functions/wood.m
index 04ff2b9de7..1aa7b60eba 100644
--- a/tests/solver-test-functions/wood.m
+++ b/tests/solver-test-functions/wood.m
@@ -45,7 +45,7 @@ if nargin==1
         fjac(4,3) = -2*C6*x(3);
         fjac(4,4) = C6+C4;
     end
-elseif nargin
+elseif ~nargin
     if nargout==1
         fval = [-3; -1; -3; -1];
     else
-- 
GitLab