[Pkg-octave-commit] [SCM] octave-symbolic branch, master, updated. a718b53403d9f164f8c2a3df521385a01d28a11b

rlaboiss rlaboiss at 416fae20-06d0-4450-9b69-c6c34d4b5f03
Mon Jan 3 03:41:12 UTC 2011


The following commit has been merged in the master branch:
commit 41aa375ae9b173f752ef62fd2b9fb6c763c5659f
Author: rlaboiss <rlaboiss at 416fae20-06d0-4450-9b69-c6c34d4b5f03>
Date:   Sat May 23 13:31:03 2009 +0000

    Add tests to the symfsolve function (inspired on the examples in doc)
    
    
    git-svn-id: https://octave.svn.sourceforge.net/svnroot/octave/trunk/octave-forge/main/symbolic@5863 416fae20-06d0-4450-9b69-c6c34d4b5f03

diff --git a/inst/symfsolve.m b/inst/symfsolve.m
index 0cc8c1f..c7dd28d 100644
--- a/inst/symfsolve.m
+++ b/inst/symfsolve.m
@@ -158,3 +158,19 @@ function [ x,inf,msg ] = symfsolve (varargin)
 	[x,inf,msg] = fsolve("symfn",X0);
 
 endfunction
+
+%!shared
+% x = sym ("x");
+% y = sym ("y");
+% f = x ^ 2 + 3 * x - 1;
+% g = x * y - y ^ 2 + 3;
+%!test
+% assert (symfsolve (f, g), [0.30278; -1.58727]', 1e-5);
+%!test
+% assert (symfsolve (f, g, x, 1, y, 5), [0.30278; 1.89004]', 1e-5);
+%!test
+% assert (symfsolve (f, g, {x==1,y==5}), [0.30278; 1.89004]', 1e-5);
+%!test
+% assert (symfsolve (f, g, [1 5]), [0.30278; 1.89004]', 1e-5);
+%!test
+% assert (symfsolve ({f, g}, {y==1,x==2}), [1.89004; 0.30278]', 1e-5);

-- 
octave-symbolic



More information about the Pkg-octave-commit mailing list