如何计算平均值和标准偏差为循环?

12个视图(30天)
story_Acc_FN_UL0_S1_5 = randn (10);
story_Acc_FN_UL0_S2_5 = randn (10);
story_Acc_FN_UL0_S3_5 = randn (10);
story_Acc_FN_UL0_S4_5 = randn (10);
story_Acc_FN_UL0_S5_5 = randn (10);
uu = 1:10
story_Acc_FN_UL0_R_rup_5 (uu) =意味着(story_Acc_FN_UL0_S1_5 (1, uu) story_Acc_FN_UL0_S2_5 (1, uu) story_Acc_FN_UL0_S3_5 (1, uu) story_Acc_FN_UL0_S4_5 (1, uu) story_Acc_FN_UL0_S5_5 (uu));
std_dvt (uu) =性病(story_Acc_FN_UL0_S1_5 (1, uu) story_Acc_FN_UL0_S2_5 (1, uu) story_Acc_FN_UL0_S3_5 (1, uu) story_Acc_FN_UL0_S4_5 (1, uu) story_Acc_FN_UL0_S5_5 (uu));
结束

接受的答案

ANKUR库马尔
ANKUR库马尔 2021年7月11日
你不需要使用循环。可以使用cat命令连接,然后使用均值和std函数矩阵本身。
story_Acc_FN_UL0_S1_5 = randn (10);
story_Acc_FN_UL0_S2_5 = randn (10);
story_Acc_FN_UL0_S3_5 = randn (10);
story_Acc_FN_UL0_S4_5 = randn (10);
story_Acc_FN_UL0_S5_5 = randn (10);
矩阵=猫(1 story_Acc_FN_UL0_S1_5 story_Acc_FN_UL0_S2_5、story_Acc_FN_UL0_S3_5 story_Acc_FN_UL0_S4_5, story_Acc_FN_UL0_S5_5)
矩阵= 5×10
0.5803 0.2545 1.3201 1.1169 1.1713 0.6641 0.6268 0.1792 0.5207 -0.8742 0.2123 -1.1177 -0.7340 -0.4116 1.6859 0.4254 -0.0838 -1.3029 0.2514 -0.0004 -0.1874 -1.3762 0.4546 -1.2224 0.4418 1.2452 0.7849 2.4942 -0.3359 -0.7775 -0.5222 2.1919 -0.1692 0.7816 0.0996 0.9557 -0.5402 0.5236 0.8086 -0.5950 1.0547 0.4665 -0.0449 0.7405 -0.2555 -1.1399 0.4181 -0.7332 -2.2922 1.3358
meanvalue =意味着(矩阵)
meanvalue = 1×10
0.2276 0.0838 0.1653 0.2010 0.6287 0.4301 0.2412 0.2322 -0.2095 -0.1823
方差=性病(矩阵)
方差= 1×10
0.6211 1.4313 0.7717 0.9834 0.7920 0.9301 0.5458 1.4571 1.2385 0.9139

更多的答案(0)

类别

找到更多的在循环和条件语句帮助中心文件交换

下载188bet金宝搏


释放

R2017a

社区寻宝

找到宝藏在MATLAB中央,发现社区如何帮助你!

开始狩猎!