comparison test/fun_sin @ 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
children
comparison
equal deleted inserted replaced
4:0aae72032c25 5:a5b2cfcf4a19
1 %!test
2 %! A = rand (5,5);
3 %! [P,lambda] = eig (A);
4 %! D = diag(sin (diag (lambda)));
5 %! B = P * D / P;
6 %! sinA = myfunm (A,@sin);
7 %! assert(sinA,B,1e-9)
8 %!
9 %!
10 %!
11 %!
12 %!
13 %!
14 %!
15