フィルターのクリア

How can i retrieve column based on cell values?

2 ビュー (過去 30 日間)
Mochammad Fariz
Mochammad Fariz 2020 年 2 月 14 日
コメント済み: Mochammad Fariz 2020 年 2 月 18 日
I just stored my data from matlab to excel file using xlswrite , looks like this..but i have no idea to query column name based on cell values..
for example if my threshold is = 1.6155 then it will retrieve column name such as = "Merah Ma , Kuning, Hijau"
return the column name values where cell values greater than 1.6155

採用された回答

Jacob Wood
Jacob Wood 2020 年 2 月 14 日
You can accomplish this with logical indexing. See below for an example:
d = {'Putih','Abu-abu','Hitam'; 0.014149,0.04175,0.081601};
thresh = 0.02;
idx = [d{2,:}] > thresh;
col_names = {d{1,idx}};
  2 件のコメント
Mochammad Fariz
Mochammad Fariz 2020 年 2 月 14 日
thank u mate
Mochammad Fariz
Mochammad Fariz 2020 年 2 月 18 日
could you help me Jacob?? i don't have idea query column based on column..this is my link of question

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by