How can i retrieve column based on cell values?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Mochammad Fariz
el 14 de Feb. de 2020
Comentada: Mochammad Fariz
el 18 de Feb. de 2020
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/271603/image.jpeg)
0 comentarios
Respuesta aceptada
Jacob Wood
el 14 de Feb. de 2020
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!