用Matlab自带的cftool拟合工具箱,其结果一般只能作为参考之用。有时它的结果完全与数据结果不相符有一定的误差。误差在于5%左右。所以对于f(x) = a1*exp(-((x-b1)/c1)^2)形式的 拟合函数可以用lsqcurvefit()或 nlinfit()来拟合,其拟合精度要比cftool拟合高的多。
需要通过二维的高斯拟合给出原子的中心位置来计算位移,大概浏览了下Matlab教程,依然一头雾水;想要通过自学熟悉使用Matlab恐怕要需要很久的时间,我目前仅需要用它来做一下图像的二维高斯拟合,而且已经有文章发表了相应的程序(相信对会使用的人都很简单,请见附件),请好心人指导下该如何操作,感激不尽!
However it seems like you want to fit a distribution because you specifically want the mean and standard deviation. You can go directly to the stats toolbox and use your data to fit the distribution. It will give you the mean and standard deviation:
Open in MATLAB Online hello robust smoothing can help you see code below ThemeCopy clc clearvars %--- Example #1: smooth a curve / narrow peaks removal --- x = linspace(0,100,256); y = cos(x/10)+(x/50).^2 + randn(size(x))/10; y([70 75 80]) = [5.5 5 6]; N = ...
General model Gauss1: f(x) = a1*exp(-((x-b1)/c1)^2) Coefficients (with 95% confidence bounds): a1 = 224.6 (211, 238.2) b1 = 10.73 (10.62, 10.85) c1 = 2.37 (2.204, 2.536)
could you tell me how to make it? sionce when I use the "createFit" Function, it shows the fitting curve in a normal Y-axis not a log-scaled one all the very best 댓글 수: 0 댓글을 달려면 로그인하십시오. ...
Share Open in MATLAB Online Download Overview Functions Version History Reviews (28) Discussions (9) [sigma,mu,A]=mygaussfit(x,y) [sigma,mu,A]=mygaussfit(x,y,h) this function is doing fit to the function y=A * exp( -(x-mu)^2 / (2*sigma^2) ) the fitting is been done by ...
Distribution fittingThis article discusses how to characterize response time (RT) frequency distributions in terms of probability functions and how to implement the necessary analysis tools using MATLAB. The first part of the paper discusses the general principles of maximum likelihood estimation. A ...
Fitting a model with noise means that the regression will not necessarily pass right through each data point. The code is run with >> demRegression Gaussian process prediction left after two points with a new data point sampled right after the new data point is included in the prediction. ...
In the Curve Fitter app, select curve data. On theCurve Fittertab, in theDatasection, clickSelect Data. In theSelect Fitting Datadialog box, selectX dataandY data, or justY dataagainst an index. Click the arrow in theFit Typesection to open the gallery, and clickGaussianin theRegression ...