matrix error in wave fitting?
coltblaze
singular matrix or other numeric error.
I don't understand the error and it should not show this when fitting a curve or am I missing something?
Function Rishabhsircronicles(w,x) : FitFunc
Wave w
Variable x
variable k,ka,k1,k2
k=(7.64*(10^-(12))) //ka =0.00000000000764
ka=225
variable p,q
p=((k/2)*(ka/x))
q=((k/3)*(ka/x))
//CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will
//CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog.
//CurveFitDialog/ Equation:
//CurveFitDialog/ f(x) = f(x) = w+a*((2/exp(h/(2*kb))*(w/T))+1)+b*(1+(2/((exp(h/(3*kb))*(w/T))-1))+(3/(exp((h/(3*kb))*(w/T))-1)^2)
//CurveFitDialog/ End of Equation
//CurveFitDialog/ Independent Variables 1
//CurveFitDialog/ x
//CurveFitDialog/ Coefficients 2
//CurveFitDialog/ w[0] = a
//CurveFitDialog/ w[1] = b
k1=(w[0]*( ( 2/(exp(p) -1) ) +1 ) )
k2= (w[1]*( 1+ ( 2/( exp( q)-1 ) ) + ( 3/((exp(q) - 1 )^2) ) ) )
return ka+K1+K2
End
Wave w
Variable x
variable k,ka,k1,k2
k=(7.64*(10^-(12))) //ka =0.00000000000764
ka=225
variable p,q
p=((k/2)*(ka/x))
q=((k/3)*(ka/x))
//CurveFitDialog/ These comments were created by the Curve Fitting dialog. Altering them will
//CurveFitDialog/ make the function less convenient to work with in the Curve Fitting dialog.
//CurveFitDialog/ Equation:
//CurveFitDialog/ f(x) = f(x) = w+a*((2/exp(h/(2*kb))*(w/T))+1)+b*(1+(2/((exp(h/(3*kb))*(w/T))-1))+(3/(exp((h/(3*kb))*(w/T))-1)^2)
//CurveFitDialog/ End of Equation
//CurveFitDialog/ Independent Variables 1
//CurveFitDialog/ x
//CurveFitDialog/ Coefficients 2
//CurveFitDialog/ w[0] = a
//CurveFitDialog/ w[1] = b
k1=(w[0]*( ( 2/(exp(p) -1) ) +1 ) )
k2= (w[1]*( 1+ ( 2/( exp( q)-1 ) ) + ( 3/((exp(q) - 1 )^2) ) ) )
return ka+K1+K2
End
My guess is a numerical problem, probably a zero derivative caused by floating point underflow, or by small differences of large numbers. Possible solutions might be:
1. Use an Epsilon wave: DisplayHelpTopic "The Epsilon Wave"
2. Rescale your problem to avoid extreme values.
September 10, 2018 at 09:15 am - Permalink
In reply to k=(7.64*(10^-(12))) //ka =0… by johnweeks
any help for rescaling.
September 11, 2018 at 04:05 am - Permalink
Re-cast your equations so that k is close to 1. There may be other problems as well.
September 11, 2018 at 03:35 pm - Permalink