'Transpose columns into new rows

How to create new rows from column easily in matlab code ?

data1
1   A   B   C   D                                                     2   E   F  G   H                                                             3   I   J   K   L


transformed data 1
1 A
1 B
1 C
2 E
2 F
2 G
3 H
3 I
3 J

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source