You are trying to plot the value 0 (the first element in w_wn
) on a logarithmic scale, which is impossible since it would have to be drawn at negative infinity. You get the same error message from
plot( [0], [1], xscale=:log10 )
Also, you probably don’t need to call collect
on your range.
If you want to initialize beta1
as the same size as w_wn
in order to fill it in a loop you can use similar(w_wn)
, or zeros(size(w_wn)...)
. But you can also initialize beta1
directly with a broadcasting computation on w_wn
instead of that loop.