'meanci' and 'predci' problem
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Aaron Powers
il 12 Gen 2016
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 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!