MATLAB: How to change pairs

pairs

I have pairs of A{i}=[ai bi]. How can I change them to pairs B{i}=[bi ai]. I like to use Matlab special features in matrices.

Best Answer

% the data
A = {[1 2], [3 4] , [5 6]}
% the insight
help fliplr
help cellfun
% the engine
B = cellfun(@fliplr, A, 'un', 0)