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

matlab中关于floor函数的作用

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
关于floor函数的作用:
9 _9 F0 j( R& v; ^/ H/ p9 d, V2 n: y! Y& i% L
floor:朝负无穷方向舍入, I9 B) B$ d, t. e4 L: w& F

5 R0 r; @5 T+ _9 MB = floor(A) rounds the elements of A to the nearest integers less than or equal to A.7 G9 Y0 Y: d: V9 _2 D
- a1 v' g( P& U- v6 v( F9 X) n
ceil:朝正无穷方向舍入
3 S. e& W  N; B
# K2 d9 \% R# }B = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A.9 d1 N2 m$ g3 n$ j, ~5 e
2 Y" {# y3 J! Q: V. @" F
fix:朝零方向舍入
7 J- }& G# n. ~8 N, Q% N* {
4 O, u# P# v7 s# R# EB = fix(A) rounds the elements of A toward zero, resulting in an array of integers.3 c, [8 P8 v: V

  D. ?2 Z# y( T8 vround:四舍五入. F6 u- n* a; b* k5 t( w5 M; Y& J
1 R. ?) n/ S9 u' [# p8 s$ d4 l
B = round(A) rounds the elements of X to the nearest integers.  + G0 k$ O2 L0 l  ]" ]
7 g6 t& B% \! V
norm:求矩阵或向量的泛数2 a8 n. K" M: [( X1 p! S+ _

0 s+ `) S& _$ i' C6 \1 i             x = [1 2 3 4 5 6];+ J5 w1 [& b. v" ~2 F- U7 _  q8 @
* N" C4 b- Y* g5 {7 g! ~) _$ |
             norm(x) = 9.5394
* c4 {3 ^. `; l+ Q' v0 h4 h- |  @1 k9 X
Example:# T5 I; I7 T% W

$ k5 n& i) ?5 \6 b- w+ x" Z& qa=         [-0.9,    -2.1,    -0.4,    0.3,    0.8,    1.1,    2.7,    -1.2+2.9i];
. j7 I, y1 Y$ N' i" H; F$ \" E) T2 m; ?4 {
floor(a)=[ -1,      -3,      -1,      0,      0,      1,      2,       -2+2i]
  l$ [  R: e/ ], {+ V
. [! P; K: w$ z2 ]* N: fceil(a)= [ 0,       -2,       0,      1,      1,      2,      3,       -1+3i]
7 B% P7 g4 C( T( ]# s) \. B5 G* M% {5 v+ y! y$ u7 M' D
fix(a)=    [ 0,       -2,       0,      0,      0,      1,      2,       -1+2i]
8 O0 @. v# \5 V4 X
$ D; a+ A0 C/ X3 X: jround(a)=[-1,       -2,       0,      0,      1,      1,      3,       -1+3i]4 N: I3 w& f0 v* c- J& b

( R$ b* A8 c* d! J注:For complex X, for all the four fuctions the imaginary and real parts are rounded independently3 O' R. d! Y) L! M

6 w* N. s! l2 F. w/ ]7 q8 v  Y
" U- s/ s; k6 X. ?; i$ J$ x0 [" L. Y3 ~) X9 K$ A' o4 }3 n

该用户从未签到

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

本版积分规则

关闭

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

EDA365公众号

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

GMT+8, 2025-11-24 02:12 , Processed in 0.140625 second(s), 23 queries , Gzip On.

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

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

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