comparing the missing value

1 次查看(过去 30 天)
Anusha
Anusha 2014-4-26
I have a vetor
a= [3 4 5 1 9 2 0]
b= [4 0 5 9 1 2]
b matrix miss value
compare two matrix..
The missing value added to the b from a

回答(2 个)

pietro
pietro 2014-4-26
编辑:pietro 2014-4-26
Here one solution:
a= [3 4 5 1 9 2 0];
b= [4 0 5 9 1 2];
b=b(find(ismember(a,intersect(a,b))==0))

Azzi Abdelmalek
Azzi Abdelmalek 2014-4-26
a= [3 4 5 1 9 2 0]
b= [4 0 5 9 1 2]
out=setdiff(a,b)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by