How can i query last column based on another values column
Afficher commentaires plus anciens

i have excel database consisting percentage values from column 1-27..my question is how can i query last column (file path of an image / column 28) based on threshold..for your information my threshold is = 1.6155 from column 1-27
2 commentaires
Bhaskar R
le 18 Fév 2020
From where you get from the threshold value?
Mochammad Fariz
le 18 Fév 2020
Modifié(e) : Mochammad Fariz
le 18 Fév 2020
Réponses (1)
KSSV
le 18 Fév 2020
You can use inequalitites ==, >, <, >=, <=. Read about them.
Read the excel data into MATLAB using xlsread or readtable.
If A is your column, and val is your value 1.6155.
% get values less then val
idx = A<val ; % this gives logical indices which are less then val
A(A<val) % this gives values which are less then val
7 commentaires
Mochammad Fariz
le 18 Fév 2020
Mochammad Fariz
le 18 Fév 2020
KSSV
le 18 Fév 2020
YOu should use num. That is the matrix of numbers....pick a column from there.
C1 = num(:,1) ; % gives first column
C7 = num(:,7) ; % gives sevent column
Mochammad Fariz
le 18 Fév 2020
KSSV
le 18 Fév 2020
Get the indices from num..and use those indices to querry the string column....
Mochammad Fariz
le 18 Fév 2020
KSSV
le 18 Fév 2020
get the last column by using
iwant = raw(:,end) ;
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
