标题: matlab中关于floor函数的作用 [打印本页] 作者: uqHZau 时间: 2020-7-7 18:55 标题: matlab中关于floor函数的作用 关于floor函数的作用: ! ~( }& Y8 s( L5 f3 r# n0 H0 P4 W" @- ^9 x( D# }
floor:朝负无穷方向舍入 9 Q: O# U; l( Z$ U* l0 p: ^5 F. Z" N$ u$ Y' h
B = floor(A) rounds the elements of A to the nearest integers less than or equal to A. 1 @; t- J; s' z4 s1 p& ~* T7 y T: w- I! |: r8 m
ceil:朝正无穷方向舍入! p! c" q$ H( H, C. B I" U
& c. r4 x( R& @+ g" a' o/ q% E
B = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A. ' {1 _5 D+ L7 Q$ |. r7 e, e 0 _$ ?9 [. V3 a3 o$ h; t0 t3 Qfix:朝零方向舍入 1 {! P: |; c6 r9 v! C, n6 S j & C- X1 c# _* k2 \3 s+ {" M6 T5 PB = fix(A) rounds the elements of A toward zero, resulting in an array of integers.( S: f, T* j3 e7 m) M& B+ K+ S