Undefined function or variable

3 vues (au cours des 30 derniers jours)
cem
cem le 21 Mai 2014
Commenté : cem le 21 Mai 2014
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 ?

Réponse acceptée

Roger Wohlwend
Roger Wohlwend le 21 Mai 2014
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 commentaire
cem
cem le 21 Mai 2014
ok thanks

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by