find structure

1 visualizzazione (ultimi 30 giorni)
joseph Frank
joseph Frank il 20 Set 2011
I have 2 structure vectors A and B. I want to find the files in A that are not in B I used x=find(~ismember(A,B)); I received an error : ??? Error using ==> double Conversion to double from struct is not possible.
Error in ==> ismember at 90 a = double(a);
How can I perform this task?
  3 Commenti
per isakson
per isakson il 20 Set 2011
Do you mean "fields" rather than "files"? If so try setdiff( fieldnames(A),fieldnames(B) )
joseph Frank
joseph Frank il 21 Set 2011
A and B come from dir( )
A = dir('ret*.mat');

Accedi per commentare.

Risposte (1)

Fangjun Jiang
Fangjun Jiang il 2 Ott 2011
setdiff({A.name},{B.name})

Categorie

Scopri di più su File Operations in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by