how to code i included in A
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/989535/image.png)
how to code " i included in A"
0 Commenti
Risposta accettata
Voss
il 6 Mag 2022
Maybe you can use ismember. (Here I'm using ii to avoid ambiguity with the imaginary unit 1i, a.k.a., i.)
ii = 3;
A = [1 2 3 4 5];
ismember(ii,A) % ii is in A
ii = [6 7];
A = [2 4 6 8 10];
ismember(ii,A) % ii(1) is in A, ii(2) is not
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Elementary Math 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!