# log10

## 语法

``Y = log10(X)``

## 说明

``Y = log10(X)` 返回数组 `X` 中每个元素的常用对数。该函数同时接受实数和复数输入。对于 `X` 在区间 (0, `Inf`) 内的实数值，`log10` 返回区间 (`-Inf` ,`Inf`) 内的实数值。对于 `X` 的复数值和负实数值，`log10` 函数返回复数值。`

## 示例

`log10(1)`
```ans = 0 ```

`log10(10)`
```ans = 1 ```

`log10(100)`
```ans = 2 ```

`log10(0)`
```ans = -Inf ```

`X = (0.5:0.5:5)';`

`Y = log10(X)`
```Y = 10×1 -0.3010 0 0.1761 0.3010 0.3979 0.4771 0.5441 0.6021 0.6532 0.6990 ```

`X``Y` 创建两个笛卡尔网格。

`[X,Y] = meshgrid(0:0.5:1.5,-2:0.5:2);`

`Z = log10(X + 1i*Y)`
```Z = 9×4 complex 0.3010 - 0.6822i 0.3142 - 0.5758i 0.3495 - 0.4808i 0.3979 - 0.4027i 0.1761 - 0.6822i 0.1990 - 0.5425i 0.2559 - 0.4268i 0.3266 - 0.3411i 0.0000 - 0.6822i 0.0485 - 0.4808i 0.1505 - 0.3411i 0.2559 - 0.2554i -0.3010 - 0.6822i -0.1505 - 0.3411i 0.0485 - 0.2014i 0.1990 - 0.1397i -Inf + 0.0000i -0.3010 + 0.0000i 0.0000 + 0.0000i 0.1761 + 0.0000i -0.3010 + 0.6822i -0.1505 + 0.3411i 0.0485 + 0.2014i 0.1990 + 0.1397i 0.0000 + 0.6822i 0.0485 + 0.4808i 0.1505 + 0.3411i 0.2559 + 0.2554i 0.1761 + 0.6822i 0.1990 + 0.5425i 0.2559 + 0.4268i 0.3266 + 0.3411i 0.3010 + 0.6822i 0.3142 + 0.5758i 0.3495 + 0.4808i 0.3979 + 0.4027i ```