配列の要素操作に関するエラー
Mostrar comentarios más antiguos
配列の要素削除に関して以下のプログラムからあるエラーが出てきており困っています。
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 です。
この時、 「添字インデックスは、実数の正の整数か、論理値のいずれかでなければなりません。」
というエラーで出てきてしまい、プログラムが実行されません。
どの様に変更すればよいのでしょうか。
どうかよろしくお願いします。
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!