find and omit element from array

2 ビュー (過去 30 日間)
NA
NA 2019 年 3 月 14 日
編集済み: NA 2019 年 3 月 14 日
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 日
21;44
% ^
vv(ismember(vv,A))=[]
  1 件のコメント
madhan ravi
madhan ravi 2019 年 3 月 14 日
Alternatively;
vv(~ismember(vv,A))

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by