error using log too many input arguments
2 次查看(过去 30 天)
显示 更早的评论
I'm having a small issue using log. I want to change the base of the log using the log(b, x) format but It shows the error to many input arguments here is my code: Xans1 = log(3, sol) -4;
0 个评论
回答(2 个)
Walter Roberson
2018-3-11
You are looking at the documentation for the symbolic log(). The numeric log() does not accept two parameters.
0 个评论
David Goodmanson
2018-3-13
Hi Janrex,
Since
log_base_b(x) = log(x)/log(b)
you could write your own function for that, just don't call it 'log'.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Exponents and Logarithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!