Skip to content

Commit 9d3012c

Browse files
committed
Update chebyshev example
1 parent 49d7eec commit 9d3012c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

examples/chebyshev.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,46 +7,46 @@ using FastTransforms
77

88
# first kind points -> first kind polynomials
99
n = 20
10-
p_1 = chebyshevpoints(Float64, n; kind=1)
10+
p_1 = chebyshevpoints(Float64, n, Val(1))
1111
f = exp.(p_1)
12-
= chebyshevtransform(f; kind=1)
12+
= chebyshevtransform(f, Val(1))
1313

1414
= x -> [cos(k*acos(x)) for k=0:n-1]' *
1515
(0.1) exp(0.1)
1616

1717
# first kind polynomials -> first kind points
18-
ichebyshevtransform(f̌; kind=1) exp.(p_1)
18+
ichebyshevtransform(f̌, Val(1)) exp.(p_1)
1919

2020
# second kind points -> first kind polynomials
21-
p_2 = chebyshevpoints(Float64, n; kind=2)
21+
p_2 = chebyshevpoints(Float64, n, Val(2))
2222
f = exp.(p_2)
23-
= chebyshevtransform(f; kind=2)
23+
= chebyshevtransform(f, Val(2))
2424

2525
= x -> [cos(k*acos(x)) for k=0:n-1]' *
2626
(0.1) exp(0.1)
2727

2828
# first kind polynomials -> second kind points
29-
ichebyshevtransform(f̌; kind=2) exp.(p_2)
29+
ichebyshevtransform(f̌, Val(2)) exp.(p_2)
3030

3131

3232
# first kind points -> second kind polynomials
3333
n = 20
34-
p_1 = chebyshevpoints(Float64, n; kind=1)
34+
p_1 = chebyshevpoints(Float64, n, Val(1))
3535
f = exp.(p_1)
36-
= chebyshevutransform(f; kind=1)
36+
= chebyshevutransform(f, Val(1))
3737
= x -> [sin((k+1)*acos(x))/sin(acos(x)) for k=0:n-1]' *
3838
(0.1) exp(0.1)
3939

4040
# second kind polynomials -> first kind points
41-
ichebyshevutransform(f̌; kind=1) exp.(p_1)
41+
ichebyshevutransform(f̌, Val(1)) exp.(p_1)
4242

4343

4444
# second kind points -> second kind polynomials
45-
p_2 = chebyshevpoints(Float64, n; kind=2)[2:n-1]
45+
p_2 = chebyshevpoints(Float64, n, Val(2))[2:n-1]
4646
f = exp.(p_2)
47-
= chebyshevutransform(f; kind=2)
47+
= chebyshevutransform(f, Val(2))
4848
= x -> [sin((k+1)*acos(x))/sin(acos(x)) for k=0:n-3]' *
4949
(0.1) exp(0.1)
5050

5151
# second kind polynomials -> second kind points
52-
ichebyshevutransform(f̌; kind=2) exp.(p_2)
52+
ichebyshevutransform(f̌, Val(2)) exp.(p_2)

0 commit comments

Comments
 (0)