How to set elements in 2D matrix to zero given Index ?
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
RuiQi
il 12 Giu 2017
Risposto: Walter Roberson
il 12 Giu 2017
gt_regions = regionprops(gt,'PixelList');
linearInd = sub2ind(size(gt), gt_regions(1).PixelList(:,2), gt_regions(1).PixelList(:,1));
Now how do I use this to set the matrix elements to zero ?
ans = gt(linearInd) == 0; ?
0 Commenti
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Linear Algebra 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!