我正在试图弄清楚如何存储值的索引或两者。步骤进行:
y1 = [] % Is a 128 length array
flagcheck = 0 %check for when found a number greater than needed
startofindex = [] %Place to save where the 1st number was found
endofindex = [] %Place where end
for g in y1:
if (y1.count(g) > 0.001):
startofindex.append(enumerate(y1.count(g))) % I know this won't work but I can't seem to find the best sol'n
flagcheck = 1;
while (flagcheck == 1):
for g in y1:
if (y1.count(g) <= 0.001):
endofindex.append(enumerate(y1.count(g)))
break
我想使用index来格式化特定点的图形轴。