find and omit element from array

3 views (last 30 days)
NA
NA on 14 Mar 2019
Edited: NA on 14 Mar 2019
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.

Accepted Answer

madhan ravi
madhan ravi on 14 Mar 2019
Edited: madhan ravi on 14 Mar 2019
21;44
% ^
vv(ismember(vv,A))=[]

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!