find and omit element from array

vv=(1:100)'
A=[3;8;21;44;60;79;99]
f_vv=find(vv==A);
vv(reshape(f_vv,length(f_vv),1))=[];
I got this error
Dimensions of arrays being concatenated are not consistent.

 採用された回答

madhan ravi
madhan ravi 2019 年 3 月 14 日
編集済み: madhan ravi 2019 年 3 月 14 日

0 投票

21;44
% ^
vv(ismember(vv,A))=[]

1 件のコメント

madhan ravi
madhan ravi 2019 年 3 月 14 日
Alternatively;
vv(~ismember(vv,A))

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

質問済み:

NA
2019 年 3 月 14 日

編集済み:

NA
2019 年 3 月 14 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by