2020b update 4 - scatterhist - help example does not work

Hello,
I was trying to use scatterhist and was getting an error. I tried to run the example code (create a scatterhist Plot) from the help documentation in 2020b update 4 and get the following below. Any assistance would be appreciated. I also tried the example in 2019b, and got the same error. I also tried the example following the first one (plot grouped data) and got an error.
>> load fisheriris.mat
>> x = meas(:,1);
>> y = meas(:,2);
>> scatterhist(x,y)
y =
3.8 8.2
Error using *
Incorrect dimensions for matrix multiplication. Check that
the number of columns in the first matrix matches the
number of rows in the second matrix. To perform
elementwise multiplication, use '.*'.
Error in scatterhist (line 450)
set(hScatter,'Xlim', XhistXlim + [-0.01,
0.01]*range(XhistXlim));
Related documentation
>> scatterhist(x,y,'Group',species,'Kernel','on')
y =
4.3 7.9
Unable to perform assignment because the size of the left side is 1-by-0 and the size of
the right side is 1-by-100.
Error in internal.stats.plotGroupedKSDensity (line 101)
px(i,:) = ksdensity(xg,xrange);
Error in
scatterhist>@()internal.stats.plotGroupedKSDensity(x,grp,'Color',clr,'LineWidth',lw,'LineStyle',lStyle,'Width',ww1)
(line 291)
Xfunc = @()internal.stats.plotGroupedKSDensity(x,grp,...
Error in scatterhist (line 393)
Xfunc();

 채택된 답변

Steven Lord
Steven Lord 2021년 2월 18일

0 개 추천

Do you perhaps have a function named range.m that's taking precedence over the range function included in Statistics and Machine Learning Toolbox?

댓글 수: 1

Yes! I searched on the path and foudn another file named range.m. I removed that file from the path and that fixed the issue. Thank you for your help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2021년 2월 18일

댓글:

2021년 2월 18일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by