Rearrange matrix and combination issues
Show older comments
I have 10 matrix(1x7) (Ei, i=1:10) like this

Firstly, I want to combine to make a new matrix with 2 column [E1,E2] [E1,E3] ... [E1,E10]
and then arrange it into 1 matrix like the image below.

How can I make a loop for this problem?
Thanks
6 Comments
madhan ravi
on 26 Nov 2018
upload your data as a text file
Dai Tran
on 26 Nov 2018
madhan ravi
on 26 Nov 2018
The datas are hard to interpret , is there any other formation of your data?
madhan ravi
on 26 Nov 2018
Does this do the job?
a=reshape([T(:,1) T(:,3)],7,[]);
a=a(:);
desired=[repmat(a(1:7),9,1) a(8:end)]
Dai Tran
on 26 Nov 2018
Answers (1)
KALYAN ACHARJYA
on 26 Nov 2018
col1=xlsread('text.xlsx','B:B');
col2=xlsread('text.xlsx','D:D');
new_text=[col1 col2];
xlswrite('new_text',new_text);
2 Comments
madhan ravi
on 26 Nov 2018
The OP wants to match E1 with all the E's
Dai Tran
on 26 Nov 2018
Categories
Find more on Sparse Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!