Prev: how to set properties of java uicontrols
Next: histc
From: Matt Fig on 17 Jan 2010 02:09 "arielon dada" <ariel_gold(a)walla.com> wrote in message > thank you very much. ismember should have worked, but it seem that it doesn't work, for cell imported from xls. > a=readxls(filename.xls) > ismember(a(1,:),a(2,:)) > return a bunch of errors > > thank you very much I am not familiar with readxls, but perhaps if you pasted the exact errors we could figure it out. Also paste the output from WHOS.
From: arielon dada on 17 Jan 2010 04:40 "Matt Fig" <spamanon(a)yahoo.com> wrote in message <hiud2f$iuo$1(a)fred.mathworks.com>... > "arielon dada" <ariel_gold(a)walla.com> wrote in message > > thank you very much. ismember should have worked, but it seem that it doesn't work, for cell imported from xls. > > a=readxls(filename.xls) > > ismember(a(1,:),a(2,:)) > > return a bunch of errors > > > > thank you very much > > I am not familiar with readxls, but perhaps if you pasted the exact errors we could figure it out. Also paste the output from WHOS. Thank you very much: this is the code: close all clear all clc [num, txt] = xlsread('f:/brk_con_dual_word/dox_run_comments/stim_ana.xls'); cells1=txt(:,1); cells2=txt(:,2); whos ismember(cells1,cells2) %gives lots of errors %I tried also with {} %cells3=txt{:,1} %cells4=txt{:,2} %ismember(cells3,cells4) This is the output (+whos): Name Size Bytes Class Attributes cells1 23x1 1560 cell cells2 23x1 1594 cell num 1x11 88 double txt 23x11 16854 cell ??? Invalid MEX-file 'C:\Program Files\MATLAB\R2009b\toolbox\matlab\datafun\sortrowsc.mexw32': C:\Program Files\MATLAB\R2009b\toolbox\matlab\datafun\sortrowsc.mexw32 is not a valid Win32 application. .. Error in ==> sortrows at 74 ndx = sortrowsc(x_sub, col); Error in ==> unique at 193 [b,ndx] = sortrows(a); Error in ==> ismember at 215 [au,am,an] = unique(a,'rows'); Error in ==> cell.ismember at 77 tfstep = ismember(char(a),char(s(chunk)),'rows'); Error in ==> Untitled2 at 10 ismember(cells1,cells2) %gives lots of errors again thanks
From: Jan Simon on 17 Jan 2010 06:12
Dear Ariel! > ??? Invalid MEX-file 'C:\Program > Files\MATLAB\R2009b\toolbox\matlab\datafun\sortrowsc.mexw32': > C:\Program > Files\MATLAB\R2009b\toolbox\matlab\datafun\sortrowsc.mexw32 is not > a valid Win32 application. This means a substantial problem. For any reason your file sortrowsc.mexw32 has been destroyed. Actually this file is installed with Matlab and never subject to changes. How could this happen?!?! Although it is absolutely important to fix this problem, I mention another solution CStrAinBP: http://www.mathworks.com/matlabcentral/fileexchange/24380 This finds the indeces of strings which appear in both cell strings. Repetitions are considered and no sorting is performed. But again: Good luck at fixing the 1st problem. Jan |