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

matlab中关于floor函数的作用

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
关于floor函数的作用:! h* _9 V2 c7 k0 T6 \

: O' h$ {/ ~5 O: U& {floor:朝负无穷方向舍入8 K5 k1 G3 `) f3 e. T

: @8 h4 K9 ]( k7 @4 sB = floor(A) rounds the elements of A to the nearest integers less than or equal to A., S! g. @* A* I8 c9 F

" C0 x! A* `5 \2 B& e# K# h2 jceil:朝正无穷方向舍入
/ w3 f/ a/ R* h9 Y! d, t( e3 u6 X! Q& p, D. F" d  i
B = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A.5 i1 x5 T# i3 D+ W1 P- Q( b

" w/ v) x+ ?+ t& ~# ~5 Xfix:朝零方向舍入' _# n9 i2 L% i5 j
2 m8 e% P0 ~7 w1 F4 q6 s
B = fix(A) rounds the elements of A toward zero, resulting in an array of integers.! D. e6 O' f% b; ~/ D- Q8 p
: }3 b' V. t$ F# I. A0 R
round:四舍五入
& T, k! `# p9 t' Q2 a5 t
* M  s; F( D# O* U+ _" LB = round(A) rounds the elements of X to the nearest integers.  : Y6 d. i4 l4 Q; g8 r
, ^0 N  ~% m+ C& J
norm:求矩阵或向量的泛数
5 o  _% D8 W6 k/ @4 A5 G8 T0 y5 s6 g2 h6 ?2 U3 p) K; }. Z$ C
             x = [1 2 3 4 5 6];+ _" l1 ?' `- _( B/ S. D% s

6 _# K( O+ D( t: |, N- m3 u             norm(x) = 9.5394! n8 F4 V: B7 x
6 n7 U7 `9 s$ p; G: D5 B
Example:
, @$ T6 Y( s; @. ^4 `& x
) U& H. Z0 b$ V% {" Ia=         [-0.9,    -2.1,    -0.4,    0.3,    0.8,    1.1,    2.7,    -1.2+2.9i];$ l& X3 f, v% w2 g7 P
% G! s! c9 d  S6 Y% c( M
floor(a)=[ -1,      -3,      -1,      0,      0,      1,      2,       -2+2i]/ E: n* j8 S9 g* Y

8 G; L' m0 k: a0 q$ o4 gceil(a)= [ 0,       -2,       0,      1,      1,      2,      3,       -1+3i]
9 U" Z$ ~/ B1 p% G
& [/ Z3 ^: R+ Lfix(a)=    [ 0,       -2,       0,      0,      0,      1,      2,       -1+2i]; ~1 }& q* I7 ?* p& S3 @  K  e. {
$ G3 m+ R" c. v
round(a)=[-1,       -2,       0,      0,      1,      1,      3,       -1+3i]
* L2 \3 l* Q6 l
/ k" _6 L. F) c* _2 J: j# O/ R( F注:For complex X, for all the four fuctions the imaginary and real parts are rounded independently9 S  [1 K/ t8 Q7 r/ l; r: C
$ E8 F7 ?9 h, D

+ d' o) l- u: L3 U: k/ L4 V
: o4 ~. F) ]) D& r" Q# `7 b/ k

该用户从未签到

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

本版积分规则

关闭

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

EDA365公众号

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

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

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

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

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