I have a function defined this way:
vol_flow(eta,x_s)=2*broadcast(+, eta.^2-eta.^4/2 , sum( broadcast(*,
broadcast(/,2*eta,r.^2).*broadcast(-,broadcast(*,2./r,broadcast(/,besselj1(broadcast(*,r,eta)),besselj0(r))),eta)
, exp(-broadcast(*,r.^2,x_s))) , 3) )
Now specifying x_s=0.05 for example
volflow(eta,0.05)=2*broadcast(+, eta.^2-eta.^4/2 , sum( broadcast(*,
broadcast(/,2*eta,r.^2).*broadcast(-,broadcast(*,2./r,broadcast(/,besselj1(broadcast(*,r,eta)),besselj0(r))),eta)
, exp(-broadcast(*,r.^2,x_s))) , 3) )
would give me a function which evaluated for an array eta gives me an
{:,1,1} array...
Now I want to use fzero
fzero(volflow,[0,1])
which tells me
ERROR: MethodError: `*` has no method matching *(::Array{Float64,3},
::Array{Float64,3})
Closest candidates are:
*(::Any, ::Any, ::Any, ::Any...)
*{TA,TQ,N}(::Union{DenseArray{TA,N},SubArray{TA,N,A<:DenseArray{T,N},I<:Tuple{Vararg{Union{Colon,Int64,Range{Int64}}}},LD}},
::Union{Base.LinAlg.QRCompactWYQ{TQ,M<:AbstractArray{T,2}},Base.LinAlg.QRPackedQ{TQ,S<:AbstractArray{T,2}}})
*(::Number, ::AbstractArray{T,N})
...
in find_zero at C:\cygwin64\home\Diger\.julia\v0.4\Roots\src\fzero.jl:64
in fzero at C:\cygwin64\home\Diger\.julia\v0.4\Roots\src\Roots.jl:105
in fzero at C:\cygwin64\home\Diger\.julia\v0.4\Roots\src\Roots.jl:112
It seems that the evaluation of fzero has trouble running since the array
structure of the additional array in dimension 2 and 3 as far as I
understand
How do I get this still running?