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

matlab中关于floor函数的作用

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
关于floor函数的作用:; g* I- O$ D3 x' U. P

8 h5 X2 y& z% ifloor:朝负无穷方向舍入4 T& j; l; z1 H# ~1 w

$ _- p( }( D3 N5 ^$ xB = floor(A) rounds the elements of A to the nearest integers less than or equal to A." N0 C' P. j; W; A3 H
) J4 j4 ^8 J( N- }" E1 {) C  q* G
ceil:朝正无穷方向舍入* l( V+ R# [% Z) |6 r' p- |+ f7 }

/ i" s# f' p6 b* O; _* aB = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A.' T5 y) p. [# f2 r

# C$ D( I  J, K0 a4 Z2 F9 e. a$ Hfix:朝零方向舍入
$ G1 v7 N- W& [* L& M0 Y+ K4 }: \$ Z8 `) K( T5 M1 s- R5 B$ Z
B = fix(A) rounds the elements of A toward zero, resulting in an array of integers.% V3 D' ^$ ^9 U; h4 l' w
1 s( U: V4 Z; J% ^
round:四舍五入1 F  l! \, V) P" s# f- l8 K- M0 Z

" _1 _* P. d; l+ O& X+ ?7 bB = round(A) rounds the elements of X to the nearest integers.  
2 L* C/ e  o: o8 f' J  a8 [3 Z1 C1 p3 n8 V5 J( \
norm:求矩阵或向量的泛数$ R4 \6 P. x: d! n+ G/ e7 {9 W: o
& E% k4 \3 U. [0 r2 h8 m
             x = [1 2 3 4 5 6];
$ x4 [: @1 c0 M
) ^( V( m0 v) Z5 N, v! t- r8 S, g: i             norm(x) = 9.5394% D# Y$ O, h& o8 ]6 H" v( g
! _! c( S2 J+ Z' W" t" [9 t% q
Example:2 I4 G' U1 Z- Y: P, ?
9 ?. M0 M, V3 P' P
a=         [-0.9,    -2.1,    -0.4,    0.3,    0.8,    1.1,    2.7,    -1.2+2.9i];
1 k$ W8 \  [# y* \+ T3 f+ Y
0 F- B0 I& `% R) r5 [floor(a)=[ -1,      -3,      -1,      0,      0,      1,      2,       -2+2i]
6 G" }2 ?& l6 r9 x$ S6 Q1 O, `9 |: `. e/ \7 y
ceil(a)= [ 0,       -2,       0,      1,      1,      2,      3,       -1+3i]" p; I, r' R0 u- ~. p
5 `* _. U2 y/ [, f* z. J3 x
fix(a)=    [ 0,       -2,       0,      0,      0,      1,      2,       -1+2i]% O9 a, ~( T/ [9 a* P" B- |
( Q: [& Z2 S; ~8 f! a- x) L8 f- p
round(a)=[-1,       -2,       0,      0,      1,      1,      3,       -1+3i]0 r( ?! [/ t" R: x& j
9 O" g# {- h' U! H  q9 c+ q
注:For complex X, for all the four fuctions the imaginary and real parts are rounded independently
2 \/ S3 ]2 {/ Y: ^0 S; k8 l+ b  t# m# S3 j: a# f
& H8 w; ^* t. m5 W

* N2 i6 }6 z1 A3 b

该用户从未签到

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

本版积分规则

关闭

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

EDA365公众号

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

GMT+8, 2025-6-26 19:04 , Processed in 0.078125 second(s), 23 queries , Gzip On.

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

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

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