关于matlab分类求平均值。

比如 b=[1 25;1 76;2 56;3 40;2 85;2 26]
b =
1 25
1 76
2 56
3 40
2 85
2 26
第一列是类别,求出来第一列分别等于1 2 3的平均值。我之前做法是把第一列unique,之后遍历循环求平均,但是数据量超大的话会很慢,有没有什么快捷的方法或者函数能求出来?

Antworten (0)

Kategorien

Mehr zu MATLAB finden Sie in Hilfe-Center und File Exchange

Tags

Gefragt:

N/A
am 16 Nov. 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!