find structure

1 次查看(过去 30 天)
joseph Frank
joseph Frank 2011-9-20
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 个评论
per isakson
per isakson 2011-9-20
Do you mean "fields" rather than "files"? If so try setdiff( fieldnames(A),fieldnames(B) )
joseph Frank
joseph Frank 2011-9-21
A and B come from dir( )
A = dir('ret*.mat');

请先登录,再进行评论。

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2011-10-2
setdiff({A.name},{B.name})

类别

Help CenterFile Exchange 中查找有关 File Operations 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by