How can I write ln in Matlab?

6 次查看(过去 30 天)
Hdez
Hdez 2021-1-22
How can I write ln in this part of my code as I keep getting an error. Thank yon
%Gaussian parameters
M= (1+nc)/2; %M= mean number
SD= sqrt (-(j-M)^2/(2*ln(20/100))); %SD= standard derivation
Error in Code2 (line 44)
SD= sqrt (-(j-M)^2/(2*ln(20/100))); %SD= standard derivation

回答(1 个)

Cris LaPierre
Cris LaPierre 2021-1-22
MATLAB uses log for natural log and log10 for log base 10.
See documentation for log and log10.

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by