Made print to file take a matrix as argument instead of 2 vectors.
Updated the test code for this method as well.
(TODO: Make the last element x = 1. Should still be n elements.)

Signed-off-by: OPSand <o.p.sand@live.com>