MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   如何在x中设置高于均值的值与与MATLAB中的均值之差 (https://www.labfans.com/bbs/showthread.php?t=24015)

poster 2019-12-10 20:48

如何在x中设置高于均值的值与与MATLAB中的均值之差
 
如何将x中高于均值的值设置为与均值之差。

x = [3 15 9 12 -1 0 -12 9 6 1]

[B]回答:[/B]

x = [3 15 9 12 -1 0 -12 9 6 1]; m = mean(x); idx = (x>m); x(idx) = x(idx) - m;

[url=https://stackoverflow.com/questions/3956490]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 01:30

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