Dot notation / vectorized code syntax

 model(x)=exp.((x.-2).^2)

or

model(x)= @. exp((x-2)^2)
2 Likes