Posts

Showing posts with the label data fitting

How to hold parameters in nlinfit (Matlab)

If you are using nlinfit to fit your data in Matlab, maybe you are interested (as I was) in finding an easy way to hold some of your parameters (by default there no option to do it). So how to hold, to fix some of the parameters? Looking on the internet I found this "official" solution link coming directly from the Mathworks support. It consists in re-writing a new version of nlinfit , called nlinfitsome , that fits only some of parameters.  The solution is pretty nice and clever but it has a drawback. The reason I use nlinfit over lsqcurvefit is because it makes relatively easy to get the error bars, however with the proposed solution this advantage is lost so I modified nlinfitsome to address this specific problem. My function , called mod_nlinfit , has exactly the same arguments of nlinfit and gives you as output the parameters and their error bars. I know that nlinfit has a richer output, but for my needs, having the parameters and error bars is enough. T...

edufit: A simple Matlab fitting interface

Image
I love Matlab, it is a great software but the tools for fitting are a bit disappointing for me (see cftool ). The problem in my case came from the need to fit many files, at once. For this reason, I have developed a simple (about 2200 code lines)  Matlab GUI interface for fitting one-dimensional data. It is called edufit. Basically it is "just" a graphical front-end that use the powerful and standard function mod_nlinfit. edufit is the best way to use Matlab for curve fitting with custom equations. Trust me! Try it and give me your feedback! System requirements: Matlab 7 or + DOWNLOAD Here is the link to package. A Userguide is included! Alternative link