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에서 Structures에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by