boxplot, popup window requiring input?

Hi. I'm trying to use the boxplot function and running into some problems. I'm trying something very simple, but it is not working. Code:
x = rand(10,1)
boxplot(x)
When I run the boxplot function a Matlab popup window opens. The name of the window is "Input name", and it is asking for me to "Enter the DATASET name:".
Even if I enter something it crashes. Can anyone help me with this problem?
Thanks, Dan

댓글 수: 9

Aniruddha Katre
Aniruddha Katre 2014년 8월 20일
There is a chance that a custom function called boxplot is being called. To check whether this is the case, execute the command "which -all boxplot" in the MATLAB command prompt. If you see more than one function called "boxplot" then you will have to remove the ones not contained in the "stats" folder from the MATLAB search path.
Doc for removing a file/folder from MATLAB search path: rmpath
What's result of
which boxplot
??? to ensure don't have an aliased function being called instead of builtin.
If that appears ok and after
clear boxplot
don't get joy, contact official TMW support at www.mathworks.com
Hi Aniruddha. Thanks for the suggestion. When I run "which -all boxplot" a get this output:
C:\Program Files\MATLAB\R2013b\toolbox\stats\stats\boxplot.m
So, it looks like there is only one function...
Andrew Reibold
Andrew Reibold 2014년 8월 20일
편집: Andrew Reibold 2014년 8월 20일
Very interesting. when i ran your code I receive no pop up, and a plot appears. Using 2014a.
Make me think its an old version, or a custom function as already suggested
dpb
dpb 2014년 8월 20일
I've R2012b here and also no issue -- looks like some sort of a bug or interaction with something else in your installation. Contact official TMW support at www.mathworks.com
Dan
Dan 2014년 8월 20일
Thank you everyone. I've sent a service request to mathworks to see if they could help me. This is a very strange problem.
Dan
Dan 2014년 8월 21일
The MathWorks responded to my problems within several hours, very efficient! It turns out that there is a sub function embedded deep in the main boxplot function (line 1903) called dataset. I have another function on my path also called dataset that was interfering. So Aniruddha and dpb, you were right about the problem, but it was not directly tied the boxplot itself.
dpb
dpb 2014년 8월 21일
편집: dpb 2014년 8월 21일
Ah, yes...name pollution, the bane of Matlab design. It'll only get worse as more and more features/functions are added. It seems too late to make any really drastic fixes as it would likely break too much existing code.
Andrew Reibold
Andrew Reibold 2014년 8월 21일
편집: Andrew Reibold 2014년 8월 21일
maybe they could do something, as painful as it would be, but have a designated prefix/suffix to EVERY built in variable. Even if it was just 'MW_' at the beginnig or something. Then everyone would know not to use that ever.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Axis Labels에 대해 자세히 알아보기

제품

태그

질문:

Dan
2014년 8월 20일

편집:

dpb
2014년 8월 21일

Community Treasure Hunt

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

Start Hunting!

Translated by