Ashutosh Singla
Ashutosh Singla

Reputation: 739

Writing 3D Array into Excel in MATLAB

I've written a MATLAB code which generates a 3D array and I want to write that array into an Excel sheet. For example, if the size of my array is 4x24x28 then it should be written in 28 different sheets in Excel.

Is there an elegant way to do this?

Upvotes: 2

Views: 242

Answers (1)

Ashutosh Singla
Ashutosh Singla

Reputation: 739

I found out a solution for the above question. The code should look like this:

filename_1 = 'Nod_TS.xlsx';
A = Nod_TS(: , : , i) ;
xlswrite(filename_1, A , ['ID_',int2str(i)] );

Where, A should be the 2D array.

Upvotes: 2

Related Questions