找回密码
 注册
关于网站域名变更的通知
查看: 546|回复: 1
打印 上一主题 下一主题

matlab中关于floor函数的作用

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2020-7-7 18:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
关于floor函数的作用:1 ]) z+ _: H2 m4 Y; P

1 B5 y2 K1 ?4 z  C6 M5 O& Tfloor:朝负无穷方向舍入
  O2 Y. S5 }' h
* N0 M7 j9 V" V, n7 NB = floor(A) rounds the elements of A to the nearest integers less than or equal to A.
. V4 x) x: e% C5 _4 a* I) C6 v& y- n0 K$ U" I2 Y
ceil:朝正无穷方向舍入4 J- A5 r% Y( \* b* ~! I
7 M% Z- x" J5 d: C9 J. l
B = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A.* j5 r4 \0 D7 f6 Z5 N+ I

; F9 C" H8 z$ e, A# x" ]) }* Cfix:朝零方向舍入
, m. s8 I' f( V- o& `7 P/ K
& ^/ P# D! Y; M8 PB = fix(A) rounds the elements of A toward zero, resulting in an array of integers.
# J  d. B* |4 C' O7 ^- @# I% R* n8 x; j8 u) m- U) u( p
round:四舍五入
5 e9 ]! F4 `# l' U+ L3 s# J( Q. S" S5 t1 I
B = round(A) rounds the elements of X to the nearest integers.  
9 Q. A* A3 o* q+ H2 a) A( T# F5 F2 _/ M; k1 w  C  J
norm:求矩阵或向量的泛数
. h) T0 S3 d, s- n. P* j( J, ~4 d' t1 O! r9 Y
             x = [1 2 3 4 5 6];
/ B" s# s% g9 Q- D9 J4 k8 O) N+ D! i* B* R! i
             norm(x) = 9.5394& f4 G$ c% x% Q' K0 \6 X6 ]
6 h& _3 x  [5 n( a% ^
Example:
$ r: U* [; J2 Q' Z; t: N
, {& g; W1 C: G  e4 |* ^a=         [-0.9,    -2.1,    -0.4,    0.3,    0.8,    1.1,    2.7,    -1.2+2.9i];
2 I9 C) t. w9 N9 P  t
8 d+ l) |4 R) l6 v  B! Z6 zfloor(a)=[ -1,      -3,      -1,      0,      0,      1,      2,       -2+2i]
5 V6 l' L  _7 ~( g8 O
/ r: h( R6 A; C4 c' X8 C' |; Lceil(a)= [ 0,       -2,       0,      1,      1,      2,      3,       -1+3i]; ?# a! ?8 E$ U7 i2 d# K' w
( v5 S" ^) d+ b4 [
fix(a)=    [ 0,       -2,       0,      0,      0,      1,      2,       -1+2i]1 }1 R8 \6 F7 M0 k4 s

8 A2 d9 ?, i  d3 U. y& T) pround(a)=[-1,       -2,       0,      0,      1,      1,      3,       -1+3i]
" K! ^: V( D/ R% [4 F
/ Q; G, i# O) y% ]# }注:For complex X, for all the four fuctions the imaginary and real parts are rounded independently8 H2 q5 R* f1 A! ^

0 n/ S4 z. [' b* F4 j3 J6 Y( ?5 S( F0 \* k7 e5 C$ q( t0 `9 O+ q

/ m- Q6 o7 v( ?, [4 J/ h9 g& q

该用户从未签到

2#
发表于 2020-7-7 20:04 | 只看该作者
matlab中关于floor函数的作用
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

推荐内容上一条 /1 下一条

EDA365公众号

关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

GMT+8, 2025-11-5 14:06 , Processed in 0.156250 second(s), 23 queries , Gzip On.

深圳市墨知创新科技有限公司

地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

快速回复 返回顶部 返回列表