The solution is given here, non linear regression.
@Marta95, it's better to avoid posting the same question twice.