Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个名为 的向量time,其中包含时间值。我想获得一个索引向量,time其中的值在 thresholdx和 threshold之间y。
time
x
y
这无疑是微不足道的,但我在这里有点用 Matlab 语法挣扎。任何帮助将不胜感激。
BLZ
time=5:20 idx = find(time > 10 & time < 15) % indices values=time(time(:)>10 & time(:)<15) % values
这给
time = 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 idx = 7 8 9 10 values = 11 12 13 14