Manipulate Mathematica - Fitting Gaussian to Data

  • Context: Mathematica 
  • Thread starter Thread starter mr_hack
  • Start date Start date
  • Tags Tags
    Mathematica
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 5K views
mr_hack
Messages
3
Reaction score
0
Manipulate Mathematica!

Hey guys

I have a data imported as List, i plotted this data as ListPlot, i need to fit this function with gaussian, the standard fit or find fit or nonlinearmodelfit didn't work, so i used Manipulate as : Manipulate[
Plot[1/(sigma Sqrt[2 \[Pi]]) E^(-(x - c)^2/(2 sigma^2)) , {x, 0.004,
0.00415}], {sigma, 0.00001, 0.00015}, {c, 0.004, 0.00415}]
to see what function suits me..
My questions: is there a way to plot my data and my maniplated plot in the same figure??
if not is there a way to use the result of Manipulate i mean the variable c, sigma when i change them with manipulate.
MyProgram:
B = Import[
"C:\\Documents and Settings\\kmallat\\Desktop\\profil et \
snr\\image00.xls"]
gj = ListPlot
gy = Manipulate[
Plot[1/(sigma Sqrt[2 \[Pi]]) E^(-(x - c)^2/(2 sigma^2)) , {x, 0.004,
0.00415}], {sigma, 0.00001, 0.00015}, {c, 0.004, 0.00415}]
 
Physics news on Phys.org