File: cdft.dia.ref

package info (click to toggle)
scilab 5.2.2-9
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 334,832 kB
  • ctags: 52,586
  • sloc: xml: 526,945; ansic: 223,590; fortran: 163,080; java: 56,934; cpp: 33,840; tcl: 27,936; sh: 20,397; makefile: 9,908; ml: 9,451; perl: 1,323; cs: 614; lisp: 30
file content (21 lines) | stat: -rw-r--r-- 673 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// =============================================================================
// Tests for cdft() function
//
// Scilab Team
// Copyright INRIA
//
// using a table
//
// =============================================================================
prec    = 1.e-5;
Tab     = [0.9,0.5,0.3,0.20,0.10,0.05,0.02];
Df      = [1,2,3,4,5,6,7];
Th      = [0.158,0.816,1.250,1.533,2.015,2.447,2.998];
[P1,Q1] = cdft("PQ",Th,Df);
[P2,Q2] = cdft("PQ",-Th,Df);
if norm(Tab-(Q1+P2)) > 0.1 then bugmes();quit;end
[P,Q] = cdft("PQ",Th,Df);
Th1   = cdft("T",Df,P,Q);
Df1   = cdft("Df",P,Q,Th);
if norm(Th1-Th) > prec then bugmes();quit;end
if norm(Df1-Df) > prec then bugmes();quit;end