'meanci' and 'predci' problem
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Aaron Powers
el 12 de En. de 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 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!