- 博客(2)
- 收藏
- 关注
转载 C/Python/Matlab 读取PCM文件
C语言读取PCM FILE *pcm; pcm = fopen("./test.pcm", "rb"); short data[128]; while(size=fread(data, sizeof(short), 128, pcm)){ float frame[128] = {0}; for(int i=0; i<128;i++){ frame[i] = data[i] / 32768; } //processing } fclose(pcm); Python读取PC
2022-04-29 14:57:52 1837 1
转载 将列表中有相同元素的集合合并(python实现)
将列表中有相同元素的集合合并(python实现): 问题描述: 假如有一个列表,列表中有许多集合,集合之间可能有重复的元素,设计一个算法,将有相同元素的集合进行合并。 代码实现: list1 = [[1,2], [2,3], [3,4],[8,9]] intersection_set = list(map(set, list1)) print(intersection_set) def merge_list(L): lenth = len(L) for i in range(1, le
2021-09-27 14:50:15 2918 2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人