|Code Listing by Yohanan Sivan|
On the gaussian fit i used "polyfit" which gives you en absolut one solution, but have some problems fitting non-linear model.
In the attached file example i use "nlinfit", which can fit any kind of function that you want. the problem is that you need to give here a starting point.
"main.m" include the example code to use nlinfit.
"data.txt" is data (x,y) that needed to...
This example demonstrate 3 different things:
1. How to stop and start a loop in Gui
2. How to change the default Gui icon
3. How to build from that an EXE program
this function is doing fit to the function
y=A * exp( -(x-mu)^2 / (2*sigma^2) )
the fitting is been done by a polyfit
the lan of the data.
All files and free downloads are copyright of their respective owners. We do not provide any hacked, cracked, illegal, pirated version of scripts, codes, components downloads. All files are downloaded from the publishers website, our file servers or download mirrors. Always Virus check files downloaded from the web specially zip, rar, exe, trial, full versions etc. Download links from rapidshare, depositfiles, megaupload etc not published.