This can be quite difficult if you have some completely arbitrary form. But you tell us this is a simple closed form. And as long as that form is not too nasty looking, you can do it easily.
The solution approach I would take is to start with a transformation. You have a problem that is mappable to a circle. SO DO THAT FIRST! That is, convert to polar coordinates. Since you show no data at all, I need to make some up.
xy = randn(1,2)*10 + [cos(t),sin(t)]*randn(2,2)*10 + randn(1,2)*20 + randn(numel(t),2)/5;
The result is in fact, just a random ellipse. I could have been more interesting about what I did, maybe something oval, or made it less obvious, but I've not yet had breakfast. Please don't ask me to think. Anyway, pretend we don't know the true shape, as then we could have used a tool out there that can fit ellipses to data. So, how can we fit a curve to this? First, go polar. (It is getting cold.)
mux = mean(x);muy = mean(y);
[theta,rad] = cart2pol(x-mux,y-muy);
Now, plot it. But don't use a polar plot. We need to think of this as just a cartesian thing now. So plot will suffice.
You can use the same transformation on the model form you have, and do a fit to your closed contour. In this case, I'm just going to use a fourier series approximation for a fit.
mdl = fit(theta,rad,'fourier4');
xhat = linspace(min(theta),max(theta),500);
plot(xhat,mdl(xhat),'r-')
Reconstructing the original curve is now simple. Just convert back from polar coordinates. Then add the means back in, and plot.