Hi, I am trying to use ismember and replace values but getting an error. Any hint? Thanks
c1={'ESP00021';'ESP00023';'ESP00023';'ESP00025'}; c2={'ESP00023';'ESP00025'}; d2=[5;26]; d2=num2cell(d2); [~,idx] = ismember(c2,c1,'rows'); c1(idx) = d2;
error: Subscript indices must either be real positive integers or logicals. % probably because I have many repeated values in c1.
Best Answer