Why does the LOG10 function return an error on SYM objects in MATLAB 6.5 (R13)?
조회 수: 4 (최근 30일)
이전 댓글 표시
When I run the following code in MATLAB 6.5 (R13) :
x = sym('x')
log10(x)
I get the following error message:
??? Error using ==> log2
Function 'log2' is not defined for values of class 'sym'.
Error in ==> C:\MATLAB6p5\toolbox\matlab\elfun\log10.m
On line 17 ==> y = log2(x);
This code works correctly in MATLAB 6.1 (R12) and returns the following result:
ans =
1125899906842624/2592480341699211*log(x)
채택된 답변
MathWorks Support Team
2009년 6월 27일
This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This is a bug in the Symbolic Math Toolbox 2.1.3 (R13).
As a workaround, try the following:
x = sym('x')
log(x)./log(10)
This will return:
ans =
1125899906842624/2592480341699211*log(x)
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Assumptions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!