i have the store of sum and want to know the index
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Shehab Tarek
il 19 Mag 2020
Risposto: Ameer Hamza
il 20 Mag 2020
i have the store_sum=[ 0.18,0.27,0.43,0.57];
and i want to know the index
starting from colum colum 2 in this matrix

0 Commenti
Risposta accettata
Ameer Hamza
il 20 Mag 2020
See ismembertol(): https://www.mathworks.com/help/releases/R2020a/matlab/ref/ismembertol.html. Something like this
M % name of your matrix
store_sum=[ 0.18,0.27,0.43,0.57];
[~, idx] = ismembertol(store_sum, M(:,2));
idx is index of elements of store_sum in the 2nd column of M.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!