From 10e2e4d8b4a7592a8631ddac8e8d1664d6f0b9e3 Mon Sep 17 00:00:00 2001 From: harpreet Date: Sat, 16 Apr 2016 12:12:15 +0530 Subject: fmincon examples --- tests/general_tests/fmincon/fmincon_logical13.sce | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests/general_tests/fmincon/fmincon_logical13.sce') diff --git a/tests/general_tests/fmincon/fmincon_logical13.sce b/tests/general_tests/fmincon/fmincon_logical13.sce index 3c6b87d..5c1246c 100644 --- a/tests/general_tests/fmincon/fmincon_logical13.sce +++ b/tests/general_tests/fmincon/fmincon_logical13.sce @@ -1,10 +1,7 @@ // Example with objective function and inequality constraints function y=fun(x) - y=0 - for i = 1:20 - y = y + exp(x(i)) - end + y=-sum(exp(x)); endfunction x0 = repmat(1,1,20); -- cgit