How to arrange alternate cells of a column into two columns?

M
Manoj Kumar · Aug 28, 2023 · 1.9K views
Question
Let's say the column matrix is: A = 2 6 7 3 8 3 2 9 7 5 4 1     And I need to obtain final result as A = 2 6 7 3 8 3 2 9 7 5 4 1 Can I know the way to split in this way?
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 23, 2026
A = [2 6 7 3 8 3 2 9 7 5 4 1]'

A = 12×1 2 6 7 3 8 3 2 9 7 5
B = [A(1:2:end) A(2:2:end)]

B = 6×2 2 6 7 3 8 3 2 9 7 5 4 1

 

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!