Error while using xlswrite for arrays
显示 更早的评论
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?
采纳的回答
更多回答(1 个)
Guillaume
2016-11-11
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');
类别
在 帮助中心 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!