MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   如何在C ++中编写MATLAB fix(X)函数? (https://www.labfans.com/bbs/showthread.php?t=22330)

poster 2019-12-02 06:25

如何在C ++中编写MATLAB fix(X)函数?
 
基本上,我想用C ++代码重新创建MATLAB脚本,并且我已经注意到该脚本使用了fix(X)函数,该函数将X每个元素四舍五入为零。对于初学者应该如何开始的任何建议将不胜感激!

例如:

X = [-1.9 -3.4; 1.6 2.5; -4.5 4.5] X = -1.9000 -3.4000 1.6000 2.5000 -4.5000 4.5000 Y = fix(X) Y = -1 -3 1 2 -4 4

[url=https://stackoverflow.com/q/59130403]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 23:29

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.