Undefined function 'log10' for input arguments of type 'embedded.fi'.
27 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Dear All,
Can you help me to understand this error message and how to avoid these errors?
Here is the longer version of the message:
Undefined function 'log10' for input arguments of type 'embedded.fi'.
Error in parameterFun (line 9)
part2 = log10(part1);
Error in procDataFit>@(x,f)parameterFun(x,f)
The error emerges when I try to use the optimization toolbox to do a curve fitting. The equation for this work is stored in a separate function file (the code is below) and I call the function as
x = [fr(i),g0,K,offset];
fun = @(x,f)parameterFun(x,f);
x = lsqcurvefit(fun,x,fi,RINData);
------------ the code of annonymous function parameterFun.m -----------
function minRin = parameterFun(x,f)
dFactor = ( x(2) + x(3));
part1 = ((f.*1e6).^2+(dFactor./(2.*pi)))
part2 = log10(part1);
minRin = x(4) + 10*part2;
0 comentarios
Respuestas (2)
Ahmed raafat
el 17 de Oct. de 2017
to get log10 for numeric data you could use this old rule
log(x) to base y = ln(x)/ln(y)
so log10(x)
you can change it to
log(x)/log(10)
0 comentarios
Walter Roberson
el 17 de Oct. de 2017
log is not supported by fi at all, not even by the CORDIC algorithms.
You might be interested in https://www.quinapalus.com/efunc.html or in http://people.sc.fsu.edu/~jburkardt/f_src/fn/fn.html
0 comentarios
Ver también
Categorías
Más información sobre Nonlinear Optimization en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!