How to find an array in a vector or matrix?
Ältere Kommentare anzeigen
I want to find a specific number in a vector, and I am using the following command
[s,t] = find(q_p_d100==qp100max)
But I get the follwoing:
s =
0×1 empty double column vector
t =
0×1 empty double column vector
However, I simply need a raw and column number of the position of the number I'm looking for.
('qp100max' is the maximum number in 'q_p_d100 vector')
Akzeptierte Antwort
Weitere Antworten (1)
Ahmed Redissi
am 14 Apr. 2021
0 Stimmen
You can use the function "ismember" to find if an array or a scalar is part of another array. Here is the documentation for it so you can learn how to use it:
Kategorien
Mehr zu Matrices and Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!