s.v.
s.v.

Reputation: 27

pulling out the result from MATLAB to Excel row by row

I do calculations on 64 elements (for p=1:64 function end) and pull out the result values in an Excel file.

Is there any way to arrange the result values for each element row by row (the values of the first element should appear on the first row, the values of the second element should appear on the second row and so on)? I used P=reshape(A,[],16) but Matlab pushes the values from right to the left mixing them.

For example, If I set the loop for the calculation p=1:1 and use P=reshape(A,[],16) the result is:

                  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

(the values of element 2 are: 17 18 19 20 21 22 23 24 25 ... 32)

Upvotes: 0

Views: 185

Answers (1)

Cyrgo
Cyrgo

Reputation: 31

Try this:

P=reshape(A,16,[])'

Is this what you need?

Upvotes: 1

Related Questions