how to skip the index of array
Show older comments
i have the index array =[1,2,1,2,4]
the output matrix =[2,3,4,5,6]
the second output matrix=[1,3,4,5,6]
the third output matrix=[2,3,4,5,6]
and so on
Accepted Answer
More Answers (1)
Stanislao Pinzón
on 27 May 2020
Maybe something like this:
A = [1,2,1,2,4];
for i=1:length(A)
B=1:6;
B(A(i))=[];
disp(B);
end
Categories
Find more on Matrix Indexing 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!