Export Multiple Matlab Matrices to an Excel File

Hi guys,
I need help to export matrices in an excel file.
Here is how the data looks like:
- An index vector of "nodes" (eng. project): Index = [1 2 3 4 5]
- A list of corresponding real nodes values: RealNodes = [180 202 303 305 450]
- Each node has an output of a [6x3] matrix that is repeated 6 times for each nodes:
---> Output(:,:,Index,Repetition) = Output(:,:,1,1) is a 6x3 matrix
Output(:,:,1,2) is a 6x3 matrix
Output(:,:,1,3) is a 6x3 matrix
.... and so on...
Output(:,:,5,6) is a 6x3 matrix
What I want to do is to import this data to a specified Excel file (pre-existing) and sort the value like this (keeping in mind that the index, node value and repetition are repeated every 6 lines, because the matrices are 6x3):
(Headers) Index -Real Node Value- Repetition Output
(Results) 1 180 1 Corresponding 6x3 matrix
1 180 2 Corresponding 6x3 matrix
.. .. and so on ..
5 450 6 Corresponding 6x3 matrix
Is it also possible to write the headers? And target a specific sheet in the excel file?
Thank you very much,
Nicolas

1 Comment

See the following : https://www.mathworks.com/help/matlab/ref/writetable.html

Sign in to comment.

Answers (0)

Asked:

on 22 Nov 2017

Commented:

KVM
on 22 Nov 2017

Community Treasure Hunt

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

Start Hunting!