Filter löschen
Filter löschen

Find position of a column given a specified array

1 Ansicht (letzte 30 Tage)
luca
luca am 17 Okt. 2019
Bearbeitet: Guillaume am 17 Okt. 2019
Hi given the two arrays
BrB= [84 56 80 58 64 56 66 62 58];
Mritsum = [5.321, 26.485 , 0.268, 110.793, 1.745, 28.92, 24.200, 3.705, 0];
anf the array
point= [0 58];
Taking as assumptions that "BrB" and "Mritsum" have the same number of column. I want to find the exact column (idx) where I have tje combination of the values indicated in "point".
In this case I would like to obtain
idx=9

Akzeptierte Antwort

Fabio Freschi
Fabio Freschi am 17 Okt. 2019
idx = find(ismember([Mritsum(:) BrB(:)],point,'rows'))
  2 Kommentare
luca
luca am 17 Okt. 2019
Thanks Fabio
Guillaume
Guillaume am 17 Okt. 2019
Bearbeitet: Guillaume am 17 Okt. 2019
or
find(Brb == point(1) & Mritsum == point(2))

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by