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

Réponses (2)

pietro
pietro le 26 Avr 2014
Modifié(e) : pietro le 26 Avr 2014

0 votes

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 le 26 Avr 2014

0 votes

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

Catégories

En savoir plus sur Operators and Elementary Operations dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by