Open andreasvarga opened 8 months ago
The following is a possible fix to the above problems:
julia> Fun(t -> [Af(t) Af(t)],Fourier())
Fun(1×4 ArraySpace:
ApproxFunBase.SumSpace{Tuple{CosSpace{PeriodicSegment{Float64}, Float64}, SinSpace{PeriodicSegment{Float64}, Float64}}, PeriodicSegment{Float64}, Float64}[Fourier(【0.0,6.283185307179586❫) Fourier(【0.0,6.283185307179586❫) Fourier(【0.0,6.283185307179586❫) Fourier(【0.0,6.283185307179586❫)], [1.0, 2.0, 1.0, -1.49908e-16, 1.0, 2.0, 1.0, -1.49908e-16, 3.0, 4.0, -4.7375e-16, 4.0, 3.0, 4.0, -4.7375e-16, 4.0])
julia> Fun(t -> [Af(t); Af(t)],Fourier())
Fun(2×2 ArraySpace:
ApproxFunBase.SumSpace{Tuple{CosSpace{PeriodicSegment{Float64}, Float64}, SinSpace{PeriodicSegment{Float64}, Float64}}, PeriodicSegment{Float64}, Float64}[Fourier(【0.0,6.283185307179586❫) Fourier(【0.0,6.283185307179586❫); Fourier(【0.0,6.283185307179586❫) Fourier(【0.0,6.283185307179586❫)], [1.0, 2.0, 1.0, 2.0, 1.0, -1.49908e-16, 1.0, -1.49908e-16, 3.0, 4.0, 3.0, 4.0, -4.7375e-16, 4.0, -4.7375e-16, 4.0])
However, I realize that a more elaborate implementation ofhcat
and vcat
is probably necessary.
The following illustrates the issue:
[Af Af]
ishcat(Af,Af)
and I would expect to produce aFun(1×4 ArraySpace:...
, while[Af; Af]
isvcat(Af,Af)
and I expect to produce aFun(2×2 ArraySpace:...
, as would result using concatenations of usual matrices. In both cases, arrays of matrices are generated, but I need to build the horizonatally or vertically concatenated matrices.I appologize if I am wrong, and I would appreciate any hint how to obtain the (for me) expected results.