Undefined function or variable

My codes are
k=2.67*10^-4;
a=0.73;
n=1.687;
log(m)=(log(n)-log(k))./a;
disp(m)
Why am i get Undefined function or variable 'm'. ERROR ?

 採用された回答

Roger Wohlwend
Roger Wohlwend 2014 年 5 月 21 日

2 投票

The syntax you used is not correct. You can only assign values to variables, not to transformed variables. You have to do your calculation in two steps. First introduce a new variable logm and calculate logm = (log(n)-log(k))/a, then calculate m = exp(logm).

1 件のコメント

cem
cem 2014 年 5 月 21 日
ok thanks

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

その他の回答 (0 件)

カテゴリ

質問済み:

cem
2014 年 5 月 21 日

コメント済み:

cem
2014 年 5 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by