comparing the missing value

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일

0 개 추천

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일

0 개 추천

a= [3 4 5 1 9 2 0]
b= [4 0 5 9 1 2]
out=setdiff(a,b)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2014년 4월 26일

답변:

2014년 4월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by