How can i query last column based on another values column

1 回表示 (過去 30 日間)
Mochammad Fariz
Mochammad Fariz 2020 年 2 月 18 日
コメント済み: KSSV 2020 年 2 月 18 日
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 件のコメント
Bhaskar R
Bhaskar R 2020 年 2 月 18 日
From where you get from the threshold value?
Mochammad Fariz
Mochammad Fariz 2020 年 2 月 18 日
編集済み: Mochammad Fariz 2020 年 2 月 18 日
i try some images to know threshold how much minimum value percentage of color to display in image..for example the image contains red,yellow,blue,green, and brown ..
red = 14.08888
yellow = 1.5554
blue = 30.8775
green = 0.8755
brown = 0.2377
then in GUI matlab will show " this image contains blue,red "

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

回答 (1 件)

KSSV
KSSV 2020 年 2 月 18 日
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 件のコメント
Mochammad Fariz
Mochammad Fariz 2020 年 2 月 18 日
could you give me some codes to query last column (string path name) based on (column 1-27 percentage name)like i describe in my picture database excel above??
KSSV
KSSV 2020 年 2 月 18 日
get the last column by using
iwant = raw(:,end) ;

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

カテゴリ

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