MATLAB: Do one action to multiple arrays

arraysMATLAB

For example if I want to delete the 2nd element for both a and b, a=[1 2 3]; b=[4 5 6]; a(2)=[]; b(2)=[]; I'm wondering is there a 1-step method to do this? Because I am dealing a large amounts of arrays. Thank you in advance!

Best Answer

a=[1 2 3]; b=[4 5 6];
A = [a;b]
A(:,2) = []
Related Question