Help CenterHelp Center
Round toward negative infinity
y =地板(x)
Y = floor(t)
Y = floor(t,unit)
example
Y = floor(X)圆形的s each element ofXto the nearest integer less than or equal to that element.
Y = floor(X)
X
Y = floor(t)圆形的s each element of theduration大批tto the nearest number of seconds less than or equal to that element.
t
duration
Y = floor(t,unit)圆形的s each element oftto the nearest number of the specified unit of time less than or equal to that element.
unit
collapse all
X = [-1.9 -0.2 3.4; 5.6 7.0 2.4+3.6i]; Y = floor(X)
Y =2×3 complex-2.0000 + 0.0000i -1.0000 + 0.0000i 3.0000 + 0.0000i 5.0000 + 0.0000i 7.0000 + 0.0000i 2.0000 + 3.0000i
Round each value in aduration大批to the nearest number of seconds less than or equal to that value.
t = hours(8) + minutes(29:31) + seconds(1.23); t.Format ='hh:mm:ss.SS'
t =1x3 duration08:29:01.23 08:30:01.23 08:31:01.23
Y1 = floor(t)
Y1 =1x3 duration08:29:01.00 08:30:01.00 08:31:01.00
Round each value int到最接近的小时数小于或等于该值。
Y2 = floor(t,'hours')
Y2 =1x3 duration08:00:00.00 08:00:00.00 08:00:00.00
Input array, specified as a scalar, vector, matrix, or multidimensional array. For complexX,地面独立对待真实和虚构的部分。
地面
地面converts logical andcharelements ofXintodoublevalues.
char
double
Data Types:single|double|int8|int16|int32|int64|uint8|uint16|uint32|uint64|char|logicalComplex Number Support:Yes
single
int8
int16
int32
int64
uint8
uint16
uint32
uint64
logical
Input duration, specified as aduration大批.
“秒”
'minutes'
'hours'
'days'
'years'
Unit of time, specified as“秒”,'minutes','hours','days', or'years'. A duration of 1 year is equal to exactly 365.2425 24-hour days.
This function fully supports tall arrays. For more information, seeTall Arrays.
Usage notes and limitations:
代码生成不支持金宝appchar或者logicaldata types forX.
backgroundPool
ThreadPool
This function fully supports thread-based environments. For more information, seeRun MATLAB Functions in Thread-Based Environment.
This function fully supports GPU arrays. For more information, seeRun MATLAB Functions on a GPU(Parallel Computing Toolbox).
This function fully supports distributed arrays. For more information, see运行具有分布式数组的MATLAB功能(Parallel Computing Toolbox).
ceil|fix|圆形的
ceil
fix
圆形的
You have a modified version of this example. Do you want to open this example with your edits?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office