Closed yewalenikhil65 closed 2 months ago
Just to mention my purpose I wished to create series in following way
a= rand(3); b= rand(3); # typically arrays of of n elements
# simplify following multiplication into another cosine series of period 2pi
(a[1] + a[2]*cos(θ) + a[3]*cos)(2θ) + ...)*(b[1] + b[2]*cos(2θ) + b[3]*cos(4θ) + ...)
If you need the analytical solution, you can use SymPy.jl.
I don't really want a symbolic solution.. Just the coefficients of the resulting CosSpace
when the multiplying CosSpaces
have different period
The theta
I wrote in earlier comment is just for explanation
Just re-expand the one with the larger period in the space with the smaller period
Just re-expand the one with the larger period in the space with the smaller period
Do you mean something like this ?
julia> using ApproxFun
julia> G = Fun(CosSpace(), rand(3)) ;
julia> G
Fun(CosSpace(【0.0,6.283185307179586❫), [0.642775, 0.257448, 0.915413])
julia> F = Fun(CosSpace(), [1,0.0, rand(), 0.0, rand() , 0.0, rand()])
Fun(CosSpace(【0.0,6.283185307179586❫), [1.0, 0.0, 0.297021, 0.0, 0.476742, 0.0, 0.711284])
julia> F*G
Fun(CosSpace(【0.0,6.283185307179586❫), [0.778723, 0.295682, 1.32454, 0.0996018, 0.767945, 0.152927, 0.675403, 0.0915593, 0.325559])
@dlfivefifty I am closing this. I managed to do finally as per my previous command
Doing following multiplication of CosSpace/ SinSpace with another CosSpace()/SinSpace() of different period leads to following error. But i do need to find the multiplication. Can anybody please help here ?