Compare two arrays of different lengths and return logical

12 次查看(过去 30 天)
Hello,
If I have A = [1, 2, 3, 4] and B = [2, 4], how can I have C return logical 1 and 0 for all elements of A so that C is the size of A?

回答(1 个)

KSSV
KSSV 2021-10-27
Read about ismember.

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by