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

matlab中关于floor函数的作用

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
关于floor函数的作用:: f/ T( B: v* N5 ~' @! f

8 e8 |+ `- d' J9 [+ efloor:朝负无穷方向舍入# }: K: }0 v) H. Q* i

3 Q) R9 L' _/ Z: D! HB = floor(A) rounds the elements of A to the nearest integers less than or equal to A., I( J& H1 [; L% g+ x4 ~0 Y

4 M7 q% [! _9 [! _: [ceil:朝正无穷方向舍入6 g) d; y+ ^5 R/ ]! W

9 C* m) c! ~- m5 \) JB = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A.
7 e8 {; @0 k+ e2 W) P. N7 N7 |) M) v/ A& ]3 T8 A. q& ^7 K
fix:朝零方向舍入/ t6 p# S; }$ I

2 ~, w9 z5 {: o- i& p# E3 {B = fix(A) rounds the elements of A toward zero, resulting in an array of integers.
. j& Y' T. \* G2 w! ~, p
) I3 V- U" ]* Y$ k% }round:四舍五入
6 W& m0 L0 y4 j8 q: K/ U
! [0 L& n# G% U1 I) `3 K0 FB = round(A) rounds the elements of X to the nearest integers.  1 O5 x9 E% Z& }4 }' }9 J% d
; u) B5 q# j  N2 H; o% K
norm:求矩阵或向量的泛数% ?4 ~- i  X# m; m5 A9 ]

2 @2 v5 C+ ?6 h, Y             x = [1 2 3 4 5 6];
0 }% O, J6 ]9 M  @5 K1 C, n* t+ j
9 J7 E0 L+ F2 a' x1 a. P             norm(x) = 9.5394* J: C5 V1 p; t1 c) ^+ @

& U; A7 R8 V9 D0 i1 f' @# V$ p4 jExample:: ^( {4 F7 \3 K, f. R, Q- T

$ d8 N4 ~# U  d$ ]/ ua=         [-0.9,    -2.1,    -0.4,    0.3,    0.8,    1.1,    2.7,    -1.2+2.9i];- B$ O5 e2 o8 F

2 T: k3 l6 e$ \) C* T. ~" c3 w  b, Ffloor(a)=[ -1,      -3,      -1,      0,      0,      1,      2,       -2+2i]
( }1 f$ a3 n& p8 s& v+ t
% T8 ^) a4 M% C; A0 d; u. hceil(a)= [ 0,       -2,       0,      1,      1,      2,      3,       -1+3i]
! O8 b( y" _. G
  L" U& A7 Q- ]3 jfix(a)=    [ 0,       -2,       0,      0,      0,      1,      2,       -1+2i]( F2 b- ~) z, g4 v; w; |% v
9 M  R1 }& C/ l3 |
round(a)=[-1,       -2,       0,      0,      1,      1,      3,       -1+3i]
) _+ V/ U3 D3 I0 m
' y/ B1 `, [, H注:For complex X, for all the four fuctions the imaginary and real parts are rounded independently
1 r9 R  Q) i' |: m6 ~
: c2 J  t% B! \  Q6 f3 i# Q7 J" N( r4 k4 ~) c9 W, X
" u0 X2 b7 @  o: k3 a7 Z

该用户从未签到

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

本版积分规则

关闭

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

EDA365公众号

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

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

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

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

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