When I try this: ( http://ch.mathworks.com/help/stats/generate-correlated-data-using-rank-correlation.html )
rng default % For reproducibility
p1 = pearsrnd(0,1,-1,4,1000,1);p2 = pearsrnd(0,1,0.75,3,1000,1);figurescatterhist(p1,p2)
It gives me:
Error using matlab.graphics.chart.primitive.Histogram/setWhile setting the 'FaceColor' property of Histogram:Color value must be a 3 element vectorError in internal.stats.plotGroupedHist (line 130) set(hXLines(i),'FaceColor',clr(i,:));Error inscatterhist>@()internal.stats.plotGroupedHist(x,grp,'NBins',xbin,'Color',clr,'DisplayStyle',style,'Norm','pdf','AxisOn',false,'PlotGroup',plotGroup)(line 299) Xfunc = @()internal.stats.plotGroupedHist(x,grp,'NBins',xbin,...Error in scatterhist (line 384) Xfunc();
WHY? How can I solve?
Best Answer