ask for matlab script to give only the entries not in other file

Hi
Suppose I have two files X and Y. Both have some entries for example
x:
1222 1232 3310 2223
y:
5555 1222 3310 1212
I want a a script to go through all entries at X, scan it, and if the the entries not present at Y print it to new file Z, so that Z contain only the entries that are in X not in Y like the following:
Z:
1232 2223
How can I do something like this ? ?

Risposte (1)

x=[1222 1232 3310 2223];
y=[5555 1222 3310 1212];
setdiff(x,y)

Questa domanda è chiusa.

Tag

Richiesto:

il 25 Gen 2012

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

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

Start Hunting!

Translated by