How to solve this only using looping
古いコメントを表示
For example A=(aa bb cc dd) and B=(aa bb xx yy zz) then i want to display like this (xx yy zz)
How to display like that by using looping only...??
採用された回答
その他の回答 (1 件)
Bish Erbas
2018 年 9 月 24 日
編集済み: Bish Erbas
2018 年 9 月 24 日
One way of accomplishing this would be:
A = [1 2 3 4 8 9];
B = [1 2 3 4 5 6 7];
for k = 1:numel(A)
B(B==A(k))=[];
end
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!