r = cell(size(r))
for jj = 1:numel(r)
r{jj} = gene{jj}(:, [1,2,4]);
end
With an explicite indices it would be:
r{jj}(:, 1:3) = gene{jj}(:, [1,2,4]);
But this is not required, because this is the default already.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!