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

matlab中关于floor函数的作用

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
关于floor函数的作用:
( ^2 N! {  K- F3 j8 C& F! A( {1 N  M2 z/ \+ F1 o4 |) j* P0 K
floor:朝负无穷方向舍入
' K4 D% t% {( Z, ]6 S3 T: ]8 h0 @- d9 b* P, Y" W
B = floor(A) rounds the elements of A to the nearest integers less than or equal to A.
& H% t4 p* R9 D2 w1 U5 m: e1 f' V7 |. y2 ]
ceil:朝正无穷方向舍入" i- t0 v7 k1 `: r

4 Q7 j' Y6 {: m  uB = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A.
' U* o- i. n7 }- s' O* ?4 W( D, K' \  `
fix:朝零方向舍入; N  \& V+ O# I% a' J
! A0 `& y# s& w: u1 B  M! }4 _# }) G
B = fix(A) rounds the elements of A toward zero, resulting in an array of integers.
" o& a9 R  Y, i! @, `9 p# u2 y0 v# O6 U/ X+ l9 w
round:四舍五入# _  `7 R4 D" N" ]! [, j% A0 z
9 R7 ^3 `$ h* c! _  i
B = round(A) rounds the elements of X to the nearest integers.  
9 |3 N" C# V* c3 C! ^% F
* F0 n% {. G7 k1 \  d2 o* c: onorm:求矩阵或向量的泛数& v1 s8 e4 ]0 _. h' _

* Y# X# C9 k* I( L  q+ r5 C             x = [1 2 3 4 5 6];  ]3 X; Y$ G# G0 Q- M3 J9 f

' l6 ^0 X9 n6 T' ~- M0 G/ N" n0 p3 \             norm(x) = 9.5394
0 `' W! M( R* O' W3 P
  ^3 g( j0 y$ L( y2 S) c% kExample:; \' q0 W5 R7 B: y* S
4 {; Q, W% P7 a5 {! m' y9 c
a=         [-0.9,    -2.1,    -0.4,    0.3,    0.8,    1.1,    2.7,    -1.2+2.9i];/ d! j3 p2 z# o. g: s# n# x

* ^( c$ z! p; j; X# W1 V' @floor(a)=[ -1,      -3,      -1,      0,      0,      1,      2,       -2+2i]( L$ W: H% d% z9 a6 y
% s' s# U" ]8 [8 ?* p; L
ceil(a)= [ 0,       -2,       0,      1,      1,      2,      3,       -1+3i]
  r# e& ^# m# x, T7 t
2 M/ t/ B' Y2 A6 U& Y' l& sfix(a)=    [ 0,       -2,       0,      0,      0,      1,      2,       -1+2i]* _! m  n2 l+ Z" ^; n/ q3 b

0 T. |$ r2 Y: {' R4 U3 Wround(a)=[-1,       -2,       0,      0,      1,      1,      3,       -1+3i]0 N0 f6 i9 g* P# m/ o5 `- r! r, p

1 E9 E6 h6 t/ C8 H* Z注:For complex X, for all the four fuctions the imaginary and real parts are rounded independently
: D; R1 S9 U9 o, J. g* d7 t' l% w/ s! D6 i( }9 y& @2 t* J* Y/ h, |" n

3 l7 l4 r! v- |4 ?  r; N  T% P9 Y  |6 D3 H" x1 }

该用户从未签到

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

本版积分规则

关闭

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

EDA365公众号

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

GMT+8, 2025-7-26 10:06 , Processed in 0.109375 second(s), 23 queries , Gzip On.

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

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

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