Error using exponents in a small mathematical equation

It seems I've run into a problem with a mathematical equation A=(-3.5*a)^3+(exp^7)/ln(524*a)+206^1/3 gives Error using exp Not enough input arguments.

 採用された回答

Andrei Bobrov
Andrei Bobrov 2016 年 9 月 22 日
編集済み: Andrei Bobrov 2016 年 9 月 22 日

2 投票

exp^7 -> exp(7) and ln(524*a) -> log(524*a)
A = (-3.5*a)^3 + exp(7)/log(524*a) + 206^1/3 ;

6 件のコメント

Anass Banbouk
Anass Banbouk 2016 年 9 月 22 日
Thanks, it seems another problem popped up after fixing exp >Undefined function or variable 'ln'.
Guillaume
Guillaume 2016 年 9 月 22 日
編集済み: Guillaume 2016 年 9 月 22 日
Please, use the documentation. The natural logarithm function in matlab is called log (and 10 based logarithm is log10)
Andrei Bobrov
Andrei Bobrov 2016 年 9 月 22 日
Oh! My mistake! Fixed.
Anass Banbouk
Anass Banbouk 2016 年 9 月 22 日
Apologies.
Anass Banbouk
Anass Banbouk 2016 年 9 月 22 日
Why does the equation >2.9^c(16+41*c/29)/1.7^5+11*c+nthroot(4,23*c) give Subscript indices must either be real positive integers or logicals.
Stephen23
Stephen23 2016 年 9 月 22 日
編集済み: Stephen23 2016 年 9 月 22 日
You are getting the error because you have used implicit multiplication, but MATLAB interprets this as indexing. The syntax you use here is for indexing into c, not for multiplication with some other value:
2.9^c(16+...
If you want to multiply these values, then you need to specify this:
2.9^c * (16+...
^

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

タグ

質問済み:

2016 年 9 月 22 日

編集済み:

2016 年 9 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by