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