From: Jessica on 9 Jul 2010 15:31 I have variables called ExcelFile2. For example, ExcelFile2 = 01_3-30-10_120035 whos ExcelFile2 Name Size Bytes Class Attributes ExcelFile2 1x17 34 char I want to loop through a series of these files and see whether they match or don't match clips. For example, the clips I have might be: Clip={'01_3-30-10_120035'; '01_3-30-10_97319'}; I tried to set-up a comparison, but it didn't work: if ExcelFile2 == Clip(1) end; but I get the error: ??? Undefined function or method 'eq' for input arguments of type 'cell'. Any suggestions for making this work so that it returns either a 1 (yes, it's a complete match) or 0 (no, it's not a complete match)? Thanks!
From: Walter Roberson on 9 Jul 2010 15:30 Jessica wrote: > I have variables called ExcelFile2. For example, > ExcelFile2 = 01_3-30-10_120035 > > whos ExcelFile2 > Name Size Bytes Class Attributes > > ExcelFile2 1x17 34 char > I want to loop through a series of these files and see whether they > match or don't match clips. For example, the clips I have might be: > > Clip={'01_3-30-10_120035'; '01_3-30-10_97319'}; > > I tried to set-up a comparison, but it didn't work: > > if ExcelFile2 == Clip(1) > end; > > but I get the error: > > ??? Undefined function or method 'eq' for input arguments of type 'cell'. > > Any suggestions for making this work so that it returns either a 1 (yes, > it's a complete match) or 0 (no, it's not a complete match)? > > Thanks! if strcmp(ExcelFile2, Clip{1}) However you should consider ismember()
From: Jessica on 9 Jul 2010 17:22 Walter Roberson <roberson(a)hushmail.com> wrote in message <i17tjb$qri$1(a)canopus.cc.umanitoba.ca>... > Jessica wrote: > > I have variables called ExcelFile2. For example, > > ExcelFile2 = 01_3-30-10_120035 > > > > whos ExcelFile2 > > Name Size Bytes Class Attributes > > > > ExcelFile2 1x17 34 char > > I want to loop through a series of these files and see whether they > > match or don't match clips. For example, the clips I have might be: > > > > Clip={'01_3-30-10_120035'; '01_3-30-10_97319'}; > > > > I tried to set-up a comparison, but it didn't work: > > > > if ExcelFile2 == Clip(1) > > end; > > > > but I get the error: > > > > ??? Undefined function or method 'eq' for input arguments of type 'cell'. > > > > Any suggestions for making this work so that it returns either a 1 (yes, > > it's a complete match) or 0 (no, it's not a complete match)? > > > > Thanks! > > if strcmp(ExcelFile2, Clip{1}) > > However you should consider ismember() Thanks, this was a big help!
|
Pages: 1 Prev: Check if .txt is empty Next: Fourier descriptor to compare curves 3D |