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

matlab中关于floor函数的作用

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
关于floor函数的作用:( U& V" e3 f) I+ }( x; {& Y6 M6 O$ f

. O% q0 x+ H! |" }: gfloor:朝负无穷方向舍入9 r7 l1 F! F1 S3 y
/ Z1 ]+ c  m" ^: H6 Z7 d
B = floor(A) rounds the elements of A to the nearest integers less than or equal to A.! H1 j. I  C5 x/ N- G

7 A, C/ Y9 ~$ gceil:朝正无穷方向舍入
/ r. a1 p6 P6 Z$ d3 t7 _5 K
% ]+ ~# Z3 S' `9 e4 y3 gB = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A.2 x# B* p: V# Y* r0 Q8 z. Q: Q

2 v( p! G' ?, q. efix:朝零方向舍入. U: a' s+ P. h- ]) u0 {! @- G; K
& w6 z* h# D/ {" g( a
B = fix(A) rounds the elements of A toward zero, resulting in an array of integers.
  v+ x- T" T. {1 h4 z& B
# x/ w4 K* U( @. J' h3 Mround:四舍五入5 c/ \% |* \8 F6 c

% x  ^3 A1 F) u. B7 `, kB = round(A) rounds the elements of X to the nearest integers.  
# W& q" r" ]4 f2 w7 A, `( z% X# _  }; u
norm:求矩阵或向量的泛数4 c- C' W. Z; T6 ?* k- m

/ R: n6 d! j* c$ t# [             x = [1 2 3 4 5 6];! A8 g3 _5 w4 J0 W% z8 B) U

: [  I. A! Q! Z0 Y8 A. M, V             norm(x) = 9.5394" s! g" _2 m+ ~4 z0 u+ S; G/ _0 i

* J0 z) `, T; w+ f6 _& K3 }Example:
* E, g: A# v. ~* O! c& C4 F1 Z8 l: q9 q' V" O" }% a" ?" U" d
a=         [-0.9,    -2.1,    -0.4,    0.3,    0.8,    1.1,    2.7,    -1.2+2.9i];& ]; ]) Q" X3 I) W5 e+ N  h
8 G3 Y) ^5 O" d. d* ~3 M% [) i
floor(a)=[ -1,      -3,      -1,      0,      0,      1,      2,       -2+2i]
7 s7 ]0 V4 r% ]/ S5 n( l; W0 C' U. Q6 ~! r  _  F( T! |$ A
ceil(a)= [ 0,       -2,       0,      1,      1,      2,      3,       -1+3i]
. |9 k& @3 t1 d1 Q: t# R% G
3 H- T8 i/ A3 |, J6 m5 D  k) P7 ]fix(a)=    [ 0,       -2,       0,      0,      0,      1,      2,       -1+2i]
4 B9 r" N# `- y7 d
) z  L1 X8 ?4 t/ {6 J% w+ [round(a)=[-1,       -2,       0,      0,      1,      1,      3,       -1+3i]1 {: ^+ {+ J, N+ C9 ?5 `% l1 v

. _% L# |4 |' B9 @, d- S& ]注:For complex X, for all the four fuctions the imaginary and real parts are rounded independently( d7 O) c7 w5 S! P, V' ~1 i- b

  E! ~8 }. r( O5 D9 t1 K/ C4 N
: `" \1 p0 n2 x+ v; y2 ]: q% X. ?4 B8 L- q9 R6 N7 }' b- c

该用户从未签到

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

本版积分规则

关闭

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

EDA365公众号

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

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

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

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

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