putting a threshold into array values
显示 更早的评论
I have an array like this:

and I would like to create a function that as an output would return smaller array, with a given threshold for 2nd column so for example I could put threshold 0.1, and based on this screenshot as I return I'd have:
result = [15 0.2249; 49 0.1674; 50 0.5343]
P.S I wouldn't mind to change format into table,
thanks in advance
采纳的回答
更多回答(1 个)
Sulaymon Eshkabilov
2021-6-5
Use this logical indexing operation:
OUT = result_Hygepdf((result_Hygepdf(:,2)>0.1), 2);
类别
在 帮助中心 和 File Exchange 中查找有关 Data Types 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!