MATLAB: How to extract from Matlab two vector with diferrent dimension in to the same excel page without having to create different sheets

#exel #import #extract #data

T=table(X(:),Y(:));
% X and Y have the same length
fileName='Project.xlsx';
writetable(T,fileName);
I need to extrac other 2 vector (with equal length) but with differente length from the privious ones to the same exel file~or at least to the same exel file but in a different sheet.
How can I do that?

Best Answer

One option, which leaves a blank column between the two sets:
T2 = table(X2(:), Y2(:));
writetable(T2, fileName, 'Range', 'D1');