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.
'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 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!