Error while using xlswrite for arrays
Mostrar comentarios más antiguos
I am trying to write few arrays of equal size 1x234 into excel but getting the following error. "Dimensions of matrices being concatenated are not consistent." My code is as follows:
Mean_percentage=[{'RandomVariable','Meanof_VA_iter','Mean_of_C_iter','Mean_of_P_iter','Mean_of_I_iter','Mean_of_U_iter'};Random,MeanVA,MeanC,MeanP,MeanI,MeanU]
xlswrite('Means', Mean_percentage)
All the arrays Random, MeanVA,MeanC,MeanP,MeanI,MeanU are of size 1x234 cell. How to fix this?
Respuesta aceptada
Más respuestas (1)
Guillaume
el 11 de Nov. de 2016
Even simpler,
t = table(Random, MeanVA, MeanC, MeanP, MeanI, MeanU , 'VariableNames', ...
{'RandomVariable', 'Meanof_VA_iter', 'Mean_of_C_iter', 'Mean_of_P_iter', 'Mean_of_I_iter', 'Mean_of_U_iter'});
writetable(t, 'Means.xlsx');
1 comentario
Daniyal Ali
el 11 de Nov. de 2016
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!