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

 採用された回答

SALAH ALRABEEI
SALAH ALRABEEI 2021 年 6 月 5 日
編集済み: SALAH ALRABEEI 2021 年 6 月 5 日

1 投票

Assume your matrix is A, and b is the threshold
% code
B= A(A(:,2)>b,:);

その他の回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 6 月 5 日

1 投票

Use this logical indexing operation:
OUT = result_Hygepdf((result_Hygepdf(:,2)>0.1), 2);

カテゴリ

ヘルプ センター および File ExchangeData Types についてさらに検索

製品

リリース

R2020b

質問済み:

M
M
2021 年 6 月 5 日

編集済み:

2021 年 6 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by