how to solve 'Too many input arguments' error?

조회 수: 2 (최근 30일)
mohanish
mohanish 2018년 9월 26일
댓글: mohanish 2018년 9월 26일
I am writing a code in which i am getting an error on line 119 which is... y=log(max(m*abs(f(a:b,:))),ath);
I am getting an error saying.. Error using log Too many input arguments. I have attached the .m file below

채택된 답변

Adam Danz
Adam Danz 2018년 9월 26일
편집: Adam Danz 2018년 9월 26일
help log
log(X) is the natural logarithm of the elements of X.
Complex results are produced if X is not positive.
You'll see that log() has one input. You are shoving in two inputs:
  • max(m*abs(f(a:b,:)))
  • ath
You must remove one.
  댓글 수: 2
Fangjun Jiang
Fangjun Jiang 2018년 9월 26일
Probably it should be y=log(max(m*abs(f(a:b,:)),ath))
mohanish
mohanish 2018년 9월 26일
thanks! It worked!

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by