This solution is outdated. To rescore this solution, sign in.
-
1 Comment
Haoyu Dai
on 30 Apr 2020
function B = swap_ends(A)
B=A;
[r,c]=size(A);
B(:,1)=A(:,c);
B(:,c)=A(:,1);
end
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!