summaryrefslogtreecommitdiff
path: root/demos/lsqnonneg.dem.sce
diff options
context:
space:
mode:
Diffstat (limited to 'demos/lsqnonneg.dem.sce')
-rw-r--r--demos/lsqnonneg.dem.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/demos/lsqnonneg.dem.sce b/demos/lsqnonneg.dem.sce
new file mode 100644
index 0000000..f9d5d78
--- /dev/null
+++ b/demos/lsqnonneg.dem.sce
@@ -0,0 +1,20 @@
+mode(1)
+//
+// Demo of lsqnonneg.sci
+//
+
+A basic lsqnonneg problem
+C = [
+0.0372 0.2869
+0.6861 0.7071
+0.6233 0.6245
+0.6344 0.6170];
+d = [
+0.8587
+0.1781
+0.0747
+0.8405];
+[xopt,resnorm,residual,exitflag,output,lambda] = lsqnonneg(C,d)
+halt() // Press return to continue
+
+//========= E N D === O F === D E M O =========//