If I have an expression where two unknown parameters and a certain range of one parameter are present then how I can get best fitted values of such two parameters by varying this range?


You should really provide some of your attempt first, and your data would be useful. But this is how I do it.

GaussianFunction = A/Sqrt[2 \[Pi] \[Sigma]^2] Exp[-(1/2) ((x - x0)/\[Sigma])^2]

Then using NonlinearModelFit[...]

GaussianFit = NonlinearModelFit[YourData,GaussianFunction ,{\[Sigma], x0},x]

You can get the results from GaussianFit["BestFitParameters"] and plot the result as Plot[GaussianFit[x],{x,xMin,xMax}]

If you want to PLOT something rather than fit something which is what your comment suggests. Then:

GaussianFunction[A_,\[Sigma]_,x_] = A/Sqrt[2 \[Pi] \[Sigma]^2] Exp[-(1/2) ((x - x0)/\[Sigma])^2] Plot[GaussianFunction[1,1,x],{x,-10,10}] For example.

  • $\begingroup$ M =.; GF = 1.16*10^(-5); MW = 80; mt = 172.44; x = (mt^2)/(MW^2); C1 = (x/8)*((x - 6)/(x - 1) + ((3*x + 2)/(x - 1)^2)*Log[10, x]); S1 = ((4*x - 11*x^2 + x^3)/(4*(1 - x)^2)) - (3/ 2)*(((Log[10, x])*x^3)/(1 - x)^3); λ = 0.0396; a = (C1/S1)*4; b = (2*Sqrt[2]*3.14^2)/(GFMW^2*S1); ueq = M == ((1 + (aUCos[Φ])/λ + (bU^2* Cos[2 Φ])/λ^2)^2 + ((aU Sin[Φ])/λ + (bU^2 Sin[2 Φ])/λ^2)^2)/0.8464 $\endgroup$ – Priti Nayek Jan 2 at 5:51
  • $\begingroup$ It is my data. Is it possible to draw any gaussian plot with these data? Actually I have a certain range of M and within this range I want to plot U Vs Phi and fro this graph I want to get an allowed range. $\endgroup$ – Priti Nayek Jan 2 at 5:59
  • $\begingroup$ @PritiNayek This isn't data that is usable. You should have some data that is in two column format e.g. {{x1,y1},{x2,y2},{x2,y2},...}. If you are talking about PLOTTING a Gaussian based on some known parameter values, then that is a different question and you are not fitting but just plotting. $\endgroup$ – Q.P. Jan 2 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.