You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that chebyshevtransform(::Matrix) is a 2D transform:
julia>using FastTransforms, ClassicalOrthogonalPolynomials
julia> n,m =3,4; f = (x,y) ->chebyshevt(n, x)chebyshevt(m,y)
#13 (generic function with 1 method)
julia> x =ChebyshevGrid{1}(10);
julia>chebyshevtransform(f.(x', x))
10×10 Matrix{Float64}:0.01.79736e-180.01.62102e-170.09.42055e-180.01.70874e-180.0-9.27717e-180.00.00.00.00.00.00.00.00.00.00.01.11341e-180.07.41045e-170.0-4.09803e-190.01.07597e-170.05.84104e-190.00.00.00.00.00.00.00.00.00.00.05.90641e-170.01.00.01.50729e-160.02.84217e-160.08.12948e-170.00.00.00.00.00.00.00.00.00.00.0-2.19853e-170.03.47114e-160.0-1.88411e-170.0-1.22156e-170.0-1.4348e-170.00.00.00.00.00.00.00.00.00.00.06.63185e-180.02.18604e-160.01.14231e-170.0-4.61608e-190.05.85226e-180.00.00.00.00.00.00.00.00.00.0
On the other hand, the following applies 1D transform to each column:
julia> n,m =3,4; f = (x,y) ->legendrep(n, x)legendrep(m,y)
#15 (generic function with 1 method)
julia>cheb2leg(chebyshevtransform(f.(x', x)))
10×10 Matrix{Float64}:0.01.83296e-170.06.46249e-170.07.18753e-180.01.30004e-180.0-1.21711e-180.00.00.00.00.00.00.00.00.00.00.01.19456e-170.0-8.58383e-170.09.06258e-190.02.95814e-170.04.36288e-190.00.00.00.00.00.00.00.00.00.00.00.3750.00.6250.06.39255e-170.01.35064e-160.01.36998e-160.00.00.00.00.00.00.00.00.00.00.05.4873e-170.01.12785e-160.0-4.54724e-170.0-1.78334e-170.0-1.84471e-170.00.00.00.00.00.00.00.00.00.00.01.45648e-160.02.70896e-160.07.99515e-180.09.33654e-180.03.97946e-180.00.00.00.00.00.00.00.00.00.0
The following gives a quick work-around that I think should be the default behaviour:
julia>functioncheb2leg2d(A::AbstractMatrix)
B =cheb2leg(A); cheb2leg(B')'end
cheb2leg2d (generic function with 1 method)
julia>cheb2leg2d(chebyshevtransform(f.(x',x)))
10×10adjoint(::Matrix{Float64}) with eltype Float64:0.0-2.15114e-170.09.6853e-170.01.35234e-170.04.64116e-180.0-3.28115e-180.00.00.00.00.00.00.00.00.00.00.06.13301e-170.0-1.44889e-160.0-3.0644e-170.07.0058e-170.01.17616e-180.00.00.00.00.00.00.00.00.00.00.0-2.34741e-170.01.00.0-5.64224e-170.01.4927e-160.03.69325e-160.00.00.00.00.00.00.00.00.00.00.0-4.39458e-180.02.26976e-160.0-6.76889e-170.0-1.92562e-170.0-4.97304e-170.00.00.00.00.00.00.00.00.00.00.0-1.88093e-170.04.23769e-160.04.91028e-180.01.72571e-170.01.0728e-170.00.00.00.00.00.00.00.00.00.0
The text was updated successfully, but these errors were encountered:
Note that
chebyshevtransform(::Matrix)
is a 2D transform:On the other hand, the following applies 1D transform to each column:
The following gives a quick work-around that I think should be the default behaviour:
The text was updated successfully, but these errors were encountered: