Returns the symbol of the number. Returns 1 when the number is positive, 0 when it is zero, and -1 when it is negative.
Syntax
SIGN(number)
Number is any real number.
In the process of developing programs and MATLAB scientific calculations, we often need to check the symbols of our calculation formulas or calculation results.
SIGN function provides us with this convenience.
The main function of the SIGN function is to return the sign of the number.
Returns 1 when the number is positive, 0 when it is zero, and -1 when it is negative.
Let's take a look at the actual operation in this table to help everyone understand this function.
![表.png 表.png](https://font2020.oss-cn-beijing.aliyuncs.com/wps/images/1821849748a58ccb0ab32ffab3a2dc16.png)
![图文对齐图.png 图文对齐图.png](https://font2020.oss-cn-beijing.aliyuncs.com/wps/images/e1ea7da86ff61befb1c583b6784f105d.png)
■ Select cell B2 and click Insert Function.
Find and select the SIGN function in the search box and click OK.
A dialog box will pop up with one parameter.
Number: any real number.
Select A2 to fill in for quick inspection.
Position the cursor to the lower right corner of cell B2 and pull down to fill in the cell when it is in the shape of + to batch inspection.
![GIF1.gif GIF1.gif](https://font2020.oss-cn-beijing.aliyuncs.com/wps/images/6c7d6a2ee7087958102dd88ba7cdba22.gif)
评论列表(196条)
测试