配列の要素操作に関するエラー
Afficher commentaires plus anciens
配列の要素削除に関して以下のプログラムからあるエラーが出てきており困っています。
a=bboxes
b=score
c=label
d=(find(score<0.9))
d=round(d)
e=numel(d)
for f=0:e
score(d(end-f))=[]
label(d(end-f))=[]
bboxes(d(end-f),:)=[]
end
となっており、bboxes,score,labelはそれぞれ他の関数から出力され、 それぞれのデータの型は
bboxesはM-by-4 matrix
scoreはM-by-1 vector
labelはM-by-1 array です。
この時、 「添字インデックスは、実数の正の整数か、論理値のいずれかでなければなりません。」
というエラーで出てきてしまい、プログラムが実行されません。
どの様に変更すればよいのでしょうか。
どうかよろしくお願いします。
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!