How to write a program to generate a table of the base-10 logarithms between 1 and 10 in steps of 0.1?

7 views (last 30 days)
% write a program to generate a table of the base-10 logarithms between 1 and 10 in steps of 0.1
x = (1:0.1:10)';
y = log10(x);
A = reshape(y,[10,10])

Answers (1)

Voss
Voss on 16 Apr 2024
x = (1:0.1:10).';
y = log10(x);
T = table(x,y,'VariableNames',{'x','log10(x)'})
T = 91x2 table
x log10(x) ___ ________ 1 0 1.1 0.041393 1.2 0.079181 1.3 0.11394 1.4 0.14613 1.5 0.17609 1.6 0.20412 1.7 0.23045 1.8 0.25527 1.9 0.27875 2 0.30103 2.1 0.32222 2.2 0.34242 2.3 0.36173 2.4 0.38021 2.5 0.39794

Categories

Find more on MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!