find and omit element from array

21 Ansichten (letzte 30 Tage)
NA
NA am 14 Mär. 2019
Bearbeitet: NA am 14 Mär. 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.

Akzeptierte Antwort

madhan ravi
madhan ravi am 14 Mär. 2019
Bearbeitet: madhan ravi am 14 Mär. 2019
21;44
% ^
vv(ismember(vv,A))=[]

Weitere Antworten (0)

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by