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 ? ?

回答(1 个)

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

此问题已关闭。

标签

提问:

2012-1-25

关闭:

2021-8-20

Community Treasure Hunt

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

Start Hunting!

Translated by