changeset 4:0aae72032c25 draft

Added files described in changeset d24a00dabdc2.
author Antonio Pino Robles <data.script93@gmail.com>
date Fri, 15 May 2015 20:30:21 +0200
parents d24a00dabdc2
children a5b2cfcf4a19
files .hgignore Makefile test/fun_cos
diffstat 3 files changed, 35 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore	Fri May 15 20:30:21 2015 +0200
@@ -0,0 +1,15 @@
+#example taken from the Hg book!
+syntax: glob
+# This line is a comment, and will be skipped.
+# Empty lines are skipped too.
+
+# Backup files left behind by the Emacs editor.
+*~
+
+# Lock files used by the Emacs editor.
+# Notice that the "#" character is quoted with a backslash.
+# This prevents it from being interpreted as starting a comment.
+.\#*
+
+# Temporary files used by the vim editor.
+.*.swp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Makefile	Fri May 15 20:30:21 2015 +0200
@@ -0,0 +1,5 @@
+paths = funm_files
+test_fun_files : tests/fun_cos
+	octave -q --eval 'addpath("funm_files:tests");' \
+		  --eval 'test fun_cos'
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/fun_cos	Fri May 15 20:30:21 2015 +0200
@@ -0,0 +1,15 @@
+%!test
+%! A = rand (5,5);
+%! [P,lambda] = eig (A); # A = P * lambda / P
+%! D = diag(cos (diag (lambda))); 
+%! B = P * D / P;
+%! cosA = myfunm (A,@cos);
+%! assert(cosA,B,1e-9)
+%!
+%!
+%!
+%!
+%!
+%!
+%!
+