Hi.
I have a DataBase(DB1) and i need to find "family" AND "work" in it.(Not OR).
my code is :
DB1 = {'family','city','May','30','(AFP)','work','US','prosecutors',… 'on','Friday','unveiled','a','14-count','indictment',… 'including','charges','of','murder','and','loan','sharking','against',… 'body','demands'};
count=0; for p=1:size((DB1)) if strcmpi(DB1{p}, 'family') && strcmpi(DB1{p}, 'work') fprintf('\n Found ') count=count+1; copyfile(file_name,des_file_addr) end end p=p+1; fprintf('\n count= %g',count) fprintf('\n -----------------------' )
My code doesn't show True Result(it shows "count =0" , But True Result("count") must be 1), can anyone help me?
Best Answer