MATLAB Answers

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

2 ビュー (過去 30 日間)
Stephen
Stephen 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]);
And
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.

採用された回答

Stephan
Stephan 2019 年 2 月 15 日
Hi,
try:
T = table(Mean, Std_Error, Deviation, Variance, Min, Max, Range, Confidence_95,'VariableNames',{'mean','sem','std','var','min','max','range','meanci'})
Best regards
Stephan

  2 件のコメント

Stephen
Stephen 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.

その他の回答 (0 件)

サインイン してこの質問に回答します。


Translated by