E.g.
% t is a table
for (yy = 1:size(t,1)) if strcmp('cat',t.animal(yy)) t.value(yy) = t.value(yy)*-1; end end
tableupdate table
% t is a table
for (yy = 1:size(t,1)) if strcmp('cat',t.animal(yy)) t.value(yy) = t.value(yy)*-1; end end
Best Answer