changeset 5:a5b2cfcf4a19 draft

Added stupid test for the sin function (in funm_files). Using octave version 4.0.0-rc3 at this point. Note: mctdemo.m (in matrixcomp) breaks giving error "'qmult' not defined".
author Antonio Pino Robles <data.script93@gmail.com>
date Fri, 15 May 2015 21:03:05 +0200
parents 0aae72032c25
children adcd5fc9b9a2
files Makefile test/fun_sin
diffstat 2 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri May 15 20:30:21 2015 +0200
+++ b/Makefile	Fri May 15 21:03:05 2015 +0200
@@ -1,5 +1,6 @@
 paths = funm_files
-test_fun_files : tests/fun_cos
-	octave -q --eval 'addpath("funm_files:tests");' \
-		  --eval 'test fun_cos'
+test_fun_files : test/fun_cos test/fun_sin 
+	octave -q --eval 'addpath("funm_files:test");' \
+		  --eval 'test fun_cos;' \
+		  --eval 'test fun_sin;' 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/fun_sin	Fri May 15 21:03:05 2015 +0200
@@ -0,0 +1,15 @@
+%!test
+%! A = rand (5,5);
+%! [P,lambda] = eig (A);
+%! D = diag(sin (diag (lambda))); 
+%! B = P * D / P;
+%! sinA = myfunm (A,@sin);
+%! assert(sinA,B,1e-9)
+%!
+%!
+%!
+%!
+%!
+%!
+%!
+