From 36cf87c20077fa48444218aa5fdf31615f78e8f2 Mon Sep 17 00:00:00 2001 From: waTeim Date: Mon, 8 Dec 2014 14:54:21 -0500 Subject: [PATCH] Fixed singular value problem in example --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 381bfa6..b2e06fe 100644 --- a/README.md +++ b/README.md @@ -18,16 +18,21 @@ relative to where the julia executable is located. # Sample Syntax -To compute the solution to a system of 3 equations and 3 unknowns. +To compute the solution to a system of 3 equations and 3 unknowns, use the Julia +linear algebra package. julia = require('node-julia'); - var a = julia.eval('[1 2 3; 4 5 6; 7 8 9 ]'); + var a = julia.eval('[ 1 2 3 ; 3 4 1; 8 2 9]'); var b = julia.eval("[1 1 1]'"); var c = julia.exec('\\',a,b); console.log('Solution: ' + c[0] + 'x + ' + c[1] + 'y + ' + c[2] + 'z'); +produces + + Solution: -0.1463414634146341x + 0.3170731707317073y + 0.17073170731707316z + # A Simple API There are 3 functions; **eval** **exec** and **Script**, [see here](http://node-julia.readme.io/)