I’m having trouble with dot notation. Can someone show me how to write the below code without expanding the square? I included a working example below, and then the code I would like to write that’s throwing an error.

This works:
‘’’
model(x)=exp.(x.^2)
model([1,1])
‘’’
however the following fails
model(x)=exp.((x.-2)^2)
model([1,1])

In this case I’m using the model in the LsqFit package, so I don’t have control over how it’s called. This way does look cleaner to me, so thanks for pointing out this alternative.