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
ARRAYFUN (and its relatives) is the usual way to do that.
But in your particular case, you can just do
mycurve = a*exp(-(d-b).^2/(2*c^2));
It's not just syntactic sugar; eliminating loops makes your code run substantially faster.