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

matlab中关于floor函数的作用

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
关于floor函数的作用:
, J4 s- y/ w" T! U! Q
0 j  M; q4 u/ s* jfloor:朝负无穷方向舍入  {' U/ |1 q8 @3 c" B( {, i
5 j" r3 s/ G+ l6 w
B = floor(A) rounds the elements of A to the nearest integers less than or equal to A.
7 k* X0 u; G) f! h. p$ d
. i4 }7 i8 o. s2 x# pceil:朝正无穷方向舍入4 M2 @4 P& O" b$ L
0 V) C& E! s# z0 p
B = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A.
% Q' y& n4 X; M3 s* w3 i5 j5 I) E* c
fix:朝零方向舍入9 w- B- r% A: h. A  C
/ a+ Z; o1 l4 e# b4 K) P
B = fix(A) rounds the elements of A toward zero, resulting in an array of integers.
/ o' Q2 e. V6 A% w
" S5 K8 B/ b9 E+ c, M) X- s) K5 N5 b9 J8 iround:四舍五入
, d1 Z. _! u. N' o) l
9 q7 F9 y( f$ L0 f2 DB = round(A) rounds the elements of X to the nearest integers.  1 \- D/ v) O# B. i, d1 M
: K3 n- [$ R# q2 V' u/ s$ [" ~7 U
norm:求矩阵或向量的泛数
3 e2 U4 Z! ?  ^* n3 o* `& l7 Z8 p/ @; _! I5 F% E
             x = [1 2 3 4 5 6];! M1 y/ G! l; |* y7 f( H* t: ~: f: H

+ y: S* h. D: A/ \             norm(x) = 9.5394$ d' w1 R  w8 C3 ?% b" O
7 ]' v: V3 Z% B
Example:) [; T' K+ ]3 m; M4 C+ x

. J- K* o, A! |4 Qa=         [-0.9,    -2.1,    -0.4,    0.3,    0.8,    1.1,    2.7,    -1.2+2.9i];* R3 F+ A- J$ H: m: ?4 x

/ I0 K* T5 o# S! q8 Efloor(a)=[ -1,      -3,      -1,      0,      0,      1,      2,       -2+2i]
9 y1 [" N9 v5 s& W
- m. |& I! P9 _ceil(a)= [ 0,       -2,       0,      1,      1,      2,      3,       -1+3i]
! E8 \( r! [& n' z0 r& u; a
& h2 @+ f; K+ ofix(a)=    [ 0,       -2,       0,      0,      0,      1,      2,       -1+2i]
+ U7 n6 h( h" y& b8 b; R7 G! C. f( U. ?" M
round(a)=[-1,       -2,       0,      0,      1,      1,      3,       -1+3i]
/ W! a7 p  q, E4 K, q" G! _4 H
& Q6 ]( i; r0 s; w注:For complex X, for all the four fuctions the imaginary and real parts are rounded independently
3 ^, H6 D1 Z/ K* l" p4 t; {; p8 `- c/ v7 |% B; t

( X: x  n" Z/ m9 z4 u7 |" Q7 u
  J3 y( D. ^2 ]% o$ v

该用户从未签到

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

本版积分规则

关闭

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

EDA365公众号

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

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

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

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

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