z = reshape(1:30,6,5).' % [] not necessary; 1:1:30 is the same as 1:30; .' is transpose, ' is complex conjugate transpose
[z([1 2],[1 2]) z([end-1 end],[end-1 end])]
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!