Reshaping 2x52 array into 1 special row

I am wondering how I can reshape an array into the format that I need.
I currently have an array structured as:
A B
C D
E F
G H
etc.
However I need it to be structured as:
A B C D E F G H
I'm unfamiliar with matlab and have little idea how to go about this. I thought reshape() may do the trick but I think that will just transpose columns and append one column after the other.
Any help is appreciated!

Antworten (1)

Stephan
Stephan am 29 Mär. 2019

1 Stimme

A = [1 2; 3 4; 5 6; 7 8]
B = reshape(A',1,[])
gives:
A =
1 2
3 4
5 6
7 8
B =
1 2 3 4 5 6 7 8

Diese Frage ist geschlossen.

Gefragt:

am 29 Mär. 2019

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by