Undefined function 'log10' for input arguments of type 'embedded.fi'.
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Ahmed raafat
2017 年 10 月 17 日
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 件のコメント
Walter Roberson
2017 年 10 月 17 日
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 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!