find and omit element from array

29 次查看(过去 30 天)
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))=[]

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by