'meanci' and 'predci' problem
1 回表示 (過去 30 日間)
古いコメントを表示
Is there a problem with the meanci and predci statistics in the grpstats function?
I can't get these to work and Evaluating the grpstats example (see : http://www.mathworks.com/help/releases/R2010b/toolbox/stats/grpstats.html)
load carsmall
[m,p,g] = grpstats(Weight,Model_Year,...
{'mean','predci','gname'})
n = length(m)
errorbar((1:n)',m,p(:,2)-m)
set(gca,'xtick',1:n,'xticklabel',g)
title('95% prediction intervals for mean weight by year')
results in:
??? Subscripted assignment dimension mismatch.
Error in ==> repmat at 54
B(nelems) = A;
Error in ==> grpstats at 297
z = repmat(t1,[ngroups,cols,1]); % one per group and col
Suggestions are much appreciated
many thanks Kind regards Cornelis
0 件のコメント
回答 (1 件)
Aaron Powers
2016 年 1 月 12 日
I tried this code out in 2014b and 2016a prerelease, and I did not receive an error -- the example ran correctly. I was unable to get access to the 2010 version of MATLAB that you may have been using. To me it looks like this problem is not visible in newer versions of MATLAB.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!