summaryrefslogtreecommitdiff
path: root/tests/general_tests/lsqnonlin/lsqnonlin_logical1.sce
diff options
context:
space:
mode:
Diffstat (limited to 'tests/general_tests/lsqnonlin/lsqnonlin_logical1.sce')
-rw-r--r--tests/general_tests/lsqnonlin/lsqnonlin_logical1.sce11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/general_tests/lsqnonlin/lsqnonlin_logical1.sce b/tests/general_tests/lsqnonlin/lsqnonlin_logical1.sce
index aef546f..ab4a7c7 100644
--- a/tests/general_tests/lsqnonlin/lsqnonlin_logical1.sce
+++ b/tests/general_tests/lsqnonlin/lsqnonlin_logical1.sce
@@ -1,7 +1,10 @@
-function retF = testmyfun(x)
+function [y,dy] = testmyfun(x)
km = [1:10]';
- retF = 2 + 2*km-exp(km*x(1))-exp(km*x(2));
+ y = 2 + 2*km-exp(km*x(1))-exp(km*x(2));
endfunction
-x0 = [0.3 0.4]'
-[x,resnorm] = lsqnonlin(testmyfun,x0)
+x0 = [0.2 0.2]'
+
+options = list("GradObj","off")
+
+[x,resnorm,residual] = lsqnonlin(testmyfun,x0,[],[],options)