Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

How to find all the numbers greater than in a certain column then all the columns

1 Ansicht (letzte 30 Tage)
Kalpha.mc
Kalpha.mc am 4 Okt. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
I need some help to find out how to use find to determine all the numbers greater than x in a column.
Example
y =[1 5 9 13
2 6 10 14
3 7 11 15
4 8 12 16]
find all the numbers equal to or above 7 in column 2
answer should be 7 ,8
I had this T = find( y >=x) but that gives you the whole table.

Antworten (1)

Walter Roberson
Walter Roberson am 4 Okt. 2020
col = 2; %must be a scalar
T = y(find(y(:,col) >= x, col)

Diese Frage ist geschlossen.

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by