I’m trying to understand broadcasting better. Here is a simple task I was working on recently:
function basis(n,x) return cos(n * pi * x) end x = rand(10) samples = [basis.(n,x) for n=1:5]
1- I was hoping to produce a 10 x 5 matrix, but it was an array of arrays???
2- Can I build the whole matrix with broadcasting?