MATLAB: How to solve this error

how to solve this error

hello all, i have this error with this code
Undefined function 'eq' for input arguments of type 'cell'.
Error in e_extructing (line 107)
if(Ex_domain(loop7_out)=='hotmail.com')
Ex_domain =regexp(k2, '(?<=@).+$', 'match' )
for loop7_out=1:length(Ex_domain)
if(Ex_domain(loop7_out)=='hotmail.com')
Ex_Z(loop7_out)=0
elseif(Ex_domain{loop7_out}=='gmail.com')
Ex_Z(loop7_out)=1
elseif(Ex_domain{loop7_out}=='yahoo.com')
Ex_Z(loop7_out)=2
elseif(Ex_domain{loop7_out}=='mail.com')
Ex_Z(loop7_out)=3
elseif(Ex_domain{loop7_out}=='live.com')
Ex_Z(loop7_out)=4
elseif(Ex_domain{loop7_out}=='msn.com')
Ex_Z(loop7_out)=5
elseif(Ex_domain{loop7_out}=='myspace.com')
Ex_Z(loop7_out)=6
elseif(Ex_domain{loop7_out}=='mynet.com')
Ex_Z(loop7_out)=7
end
end

Best Answer

Unfortunately, you can't use == when comparing strings. Replace
Ex_domain(loop7_out)=='hotmail.com'
and all the similar logical checks with
strcmpi(Ex_domain(loop7_out),'hotmail.com')