How can I calculate log10(variable) ??? there is error..

조회 수: 5 (최근 30일)
Chris
Chris 2021년 10월 17일
답변: Dave B 2021년 10월 17일
How can I calculate log10(variable) ??? there is error..
  댓글 수: 2
Steven Lord
Steven Lord 2021년 10월 17일
What is the full and exact text of that error message (everything displayed in red in the Command Window)?
the cyclist
the cyclist 2021년 10월 17일
Or upload variable in a mat file here, using the paperclip in the INSERT section of the toolbar.

댓글을 달려면 로그인하십시오.

채택된 답변

Dave B
Dave B 2021년 10월 17일
Assuming you've defined your variable and it's numeric, this should work:
variable=100;
log10(variable)
ans = 2
x=[100 200 500 1000];
log10(x)
ans = 1×4
2.0000 2.3010 2.6990 3.0000
It may fail if you haven't defined your variable:
log10(y)
Or if your variable is not numeric:
z="100";
log10(z)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Text Data Preparation에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by