Skip to content

Commit

Permalink
Fixed singular value problem in example
Browse files Browse the repository at this point in the history
  • Loading branch information
waTeim committed Dec 8, 2014
1 parent b6492cb commit 36cf87c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down

0 comments on commit 36cf87c

Please sign in to comment.