• MATLAB中floor、round、ceil、fix区别


    MATLAB中floor、round、ceil、fix区别

    B = floor(A) rounds the elements of A to the nearest integers less than or equal to A. For complex A, the imaginary and real parts are rounded independently.   (floor:朝负无穷方向舍入)

    B = ceil(A) rounds the elements of A to the nearest integers greater than or equal to A. For complex A, the imaginary and real parts are rounded independently. (ceil:朝正无穷方向舍入)

    B = fix(A) rounds the elements of A toward zero, resulting in an array of integers. For complex A, the imaginary and real parts are rounded independently. (fix:朝零方向舍入 )

    B = round(A) rounds the elements of X to the nearest integers. For complex X, the imaginary and real parts are rounded independently. (round:四舍五入)

  • 相关阅读:
    5 November
    31 October
    K-th Path
    P1525 关押罪犯
    dp-棋盘形dp
    P1462 通往奥格瑞玛的道路
    noip2017部分题目
    洛谷orz--尺取法
    树形dp
    最短路练习
  • 原文地址:https://www.cnblogs.com/wjgaas/p/3613392.html
Copyright © 2020-2023  润新知