Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
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?

Respuesta aceptada

Tommy
Tommy el 30 de Abr. de 2020
One option, which leaves a blank column between the two sets:
T2 = table(X2(:), Y2(:));
writetable(T2, fileName, 'Range', 'D1');
  8 comentarios
Tommy
Tommy el 30 de Abr. de 2020
You can do that! T and L are different tables, you are able to use any valid syntax of the function table() for either one. Do you get an error if you do try it like that? i.e.
T=table(deaths(:),rate(:),'VariableNames',{'Deaths','Rate'});
fileName='Results.xlsx';
writetable(T,fileName);
L=table(Mortality(:),life(:), 'Variablenames', {'Mortality','life'});
writetable(L,fileName,'Range','D1');

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by