|
From: André F. <a.f...@gm...> - 2016-09-28 10:30:49
|
A follow-up on my issue finding the full width at half height. I have tried using the find_root instead so I define a function f(x) /* [wxMaxima: input start ] */ f(x) := -SplineSFitCrossCorr[1](x) - CrossCorrelationsShift[1]/2$ /* [wxMaxima: input end ] */ where -SplineSFitCrossCorr[1](x) is the spline I have made based on the data and CrossCorrelationsShift[1]/2 is the half height of the peak I am trying to find the width of. Then I run this find_root(f(x),x,-15,15) and I get this output (showing only part of it) find_root([-(1.644898582136851*10^-4*x^3+0.007402043619615831*x^2+0.1081554815930787*x+0.4957946062003042)* charfun(x<-14)-charfun(4<=x and x<5)* (1.117076017317504*10^-4*x^3-0.001802508781380471*x^2+0.001147908066100174*x+0.040843879341963)-charfun(5<=x and x<6)* (1.073977735114262*10^-4*x^3-0.001737861358075608*x^2+8.24670949575862*10^-4*x+0.04138260786950352)- charfun(3<=x and x<4)*(1.052478698634486*10^-4*x^3-0.00172499199896085*x^2+8.378409364216931*10^-4*x+0.0412573021815343)- charfun(6<=x and x<7)* (9.379365045859012*10^-5*x^3-0.001492987143124559*x^2-6.445743401304309*10^-4*x+0.04432109844891611)- charfun(2<=x and x<3)* (8.728363099403584*10^-5*x^3-0.001563313849136134*x^2+.....,- 15.0,15.0) Why isn't it evaluating it? Or am I using find_root wrong? There should be two solutions f(x). |