I came into matrix world from loop world (C, etc)
I would like to call a function on each individual member of a vector/matrix, and return the resulting vector/matri
In matlab the '.' prefix on operators is element-wise operation.
Try something like this:
function r = newfun(v) r = a.*exp(-(v-b).^2./(2*c^2)) end