MATLAB: Exporting a 3D file matxls I am trying to export a 3D .mat file into an .xls or even a .txt file, but I cant do that as the load/write functions work only for 2D .mat files. Any ideas? Best Answer If A is your 3D arrayn=size(A,3)for k=1:n xlswrite('yourfile.xls',A(:,:,k),sprintf('sheet%d',k))end Related SolutionsMATLAB: Put excel collumns in an array Hey ! I hope this is what you are looking for....% Read Excel Sheet[~,~,data] = xlsread('Add path to the excel file (.xlsx)');% Save columnsarraycolumn2 = data(:,2); % Parse column 2arraycolumn3 = data(:,3); % Parse column 3 MATLAB: Structure Export Structure, or structure array?Structure case:t = struct2cell(S);fprintf(fid, '%s,%s,%s,%f\n', t{:}); Related QuestionExporting double using exportHow to save tables to different sheets in one xlsx fileXls export problem
Best Answer