Undefined function 'ln' for input arguments of type 'double'.
14 ビュー (過去 30 日間)
古いコメントを表示
Alvaro Mª Zumalacarregui Delgado
2021 年 2 月 22 日
コメント済み: Alvaro Mª Zumalacarregui Delgado
2021 年 2 月 22 日
I am trying to represent a function and before my code has an operation with a Ln, and when I run the app and click the button give this message 'Undefined function 'ln' for input arguments of type 'double'.' how can i solve it?
P = app.P.Value;
Q = app.Q.Value;
a = app.a.Value;
b = app.b.Value;
Xo = app.Xo.Value;
Yo =app.Yo.Value;
K = b.*Xo-a.*Yo;
C3 = (ln(a.*Yo)-ln(Xo))/- K;
C4 = (ln(b.*Xo)-ln(Yo))/- K;
x = 0:0.2:100;
y3 = K./(exp((K*x-K*C3))-b);
plot (app.Axes,x,y3,'r');
hold (app.Axes,'on')
y4 = - K./(exp(K*x-K*C4)-a);
plot (app.Axes,x,y4,'b');
hold (app.Axes,'off')
0 件のコメント
採用された回答
Steven Lord
2021 年 2 月 22 日
The natural logarithm function in MATLAB is named log not ln. There are also log10 and log2 functions listed in the See Also section at the end of the log documentation page.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Logging についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!