www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/CalculateScalarCommonLogarithmValuesExample.m

    %% Calculate Scalar Common Logarithm Values  
% Examine several values of the base 10 logarithm function.   

%% 
% Calculate the common logarithm of 1. 
log10(1) 

%%
% The result is |0|, so this is the x-intercept of the |log10| function.

%% 
% Calculate the common logarithm of 10. 
log10(10) 

%%
% The result is |1| since $10^1 = 10$.  

%% 
% Calculate the common logarithm of 100. 
log10(100) 

%%
% The result is |2| since $10^2 = 100$.  

%% 
% Calculate the common logarithm of 0. 
log10(0) 

%%
% The result is |-Inf| since $10^{-\infty} = 0$.