Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Fitting step function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122124] Re: Fitting step function
  • From: premiumxy <spam at stefanabel.com>
  • Date: Sat, 15 Oct 2011 06:04:05 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

Thanks for your quick and very useful replies!

@Jacopo:
Actually, I already started to follow the approach that you mentioned. The main problem is that my data is at some points quite noisy, and I often have single points that are far off.
To not identify these points with your approach, I would have to filter them out/average the rest... it works, but is not as nice compared to a real fitting procedure, to my opinion.

@Barrie:
I did not fully understand your message: I see that you used a ArcTan function to fit the data. Similar to a Tanh function, this is a continuous function where I did not really encounter any problems.
A main question for me was: why do the step-functions (like UnionStep...) not work with the fitting routine (at least in my case, it did not vary the parameters during the NonlinearModel fit.
Could you also use a step function in your example?

Also, since you asked, here is a typical dataset. There are phase steps, one at x=0 (Degrees), and the other one at approx x=-70. Please let me know if you need further infos. (The x-values correspond to angles, and do to symmetry considerations the data should be identical for x=+/-180 (Degree) shifts).

Thanks!


{{-100., 57.4948}, {-90., 
  42.6258}, {-80., -3.01049}, {-70., -53.8789}, {-60., -78.5062}, \
{-50., -96.6829}, {-40., -101.013}, {-30., -104.941}, {-20., \
-107.919}, {-10., -103.491}, {-9.18182, -103.468}, {-8.36364, \
-103.428}, {-7.54546, -105.213}, {-6.72727, -105.881}, {-5.90909, \
-106.698}, {-5.09091, -107.537}, {-4.27273, -110.424}, {-3.45455, \
-111.979}, {-2.63636, -112.266}, {-1.81818, -113.822}, {-1., \
-117.458}, {-0.916667, -117.899}, {-0.833333, -117.818}, {-0.75, \
-118.569}, {-0.666667, -120.746}, {-0.583333, -122.002}, {-0.5, \
-121.36}, {-0.416667, -123.908}, {-0.333333, -127.475}, {-0.25, \
-132.497}, {-0.166667, -142.056}, {-0.0833333, -138.18}, {0., 
  172.553}, {0.0833333, 95.6629}, {0.166667, 78.5605}, {0.25, 
  75.5235}, {0.333333, 76.3874}, {0.416667, 66.8391}, {0.5, 
  73.1105}, {0.583333, 75.8971}, {0.666667, 73.563}, {0.75, 
  73.4579}, {0.833333, 71.3489}, {0.916667, 72.4683}, {1., 
  73.004}, {1.81818, 72.7993}, {2.63636, 71.4382}, {3.45455, 70.4792},
  {4.27273, 94.4053}, {5.09091, 91.554}, {5.90909, 90.8934}, {6.72727,
   89.555}, {7.54546, 88.8319}, {8.36364, 86.212}, {9.18182, 
  86.6523}, {10., 84.9855}, {20., 66.2744}, {30., 63.914}, {40., 
  62.9344}, {50., 59.8152}, {60., 70.5103}, {70., 67.1989}, {80., 
  58.172}, {90., 43.9631}, {100., 0.901958}}



  • Prev by Date: Re: Plot function with two arguments
  • Next by Date: A possible typo in the program of "Mathematica Navigator" by Heikki
  • Previous by thread: Re: Fitting step function
  • Next by thread: Re: Fitting step function