You should merge x and y to a single variable (i.e. a 2 element vector). That way you can do this with a single call to lsqnonlin.
And you should remove that clc, clear all, close all. You don't need it and using it is a clear indication you don't know what you want to happen. Are you opening any figures? Do you really want to reduce the performance of several functions by wiping the optimization from memory with clear all?