MATLAB Answers


Receiving 'Dimensions of arrays being concatenated are not consistent.' error, but there are equal amounts of rows being input.

さんによって質問されました 2019 年 2 月 15 日
最新アクティビティ Stephan
さんによって コメントされました 2019 年 2 月 15 日
I am trying to make a table where the first column is variable names, and the second is variable data. I have tried;
T = table(['mean';'sem';'std';'var';'min';'max';'range';'meanci'],[Mean, Std_Error, Deviation, Variance, Min, Max, Range, Confidence_95]);
T = table(['mean';'sem';'std';'var';'min';'max';'range';'meanci'],[Mean; Std_Error; Deviation; Variance; Min; Max; Range; Confidence_95]);
The variables are coming from the following liine earlier in the script;
[Mean,Std_Error,Deviation,Variance,Min,Max,Range,Confidence_95] = grpstats(sampledata,[],{'mean','sem','std','var','min','max','range','meanci'});
I am definitely just doing something silly as I a terrible at Matlab.
Thanks in advance!

  0 件のコメント

サインイン to comment.

1 件の回答

回答者: Stephan
2019 年 2 月 15 日

T = table(Mean, Std_Error, Deviation, Variance, Min, Max, Range, Confidence_95,'VariableNames',{'mean','sem','std','var','min','max','range','meanci'})
Best regards

  2 件のコメント

2019 年 2 月 15 日
Thanks Stephan! That's got the variable names correct and I can certainly use it.
Is there a simple way to transpose them to columns (for neatness sake in a report), if not this will do fine :)

サインイン to comment.

Translated by