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 comentarios

Aniruddha Katre
Aniruddha Katre el 20 de Ag. de 2014
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
dpb
dpb el 20 de Ag. de 2014
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
Dan
Dan el 20 de Ag. de 2014
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 el 20 de Ag. de 2014
Editada: Andrew Reibold el 20 de Ag. de 2014
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 el 20 de Ag. de 2014
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 el 20 de Ag. de 2014
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 el 21 de Ag. de 2014
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 el 21 de Ag. de 2014
Editada: dpb el 21 de Ag. de 2014
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 el 21 de Ag. de 2014
Editada: Andrew Reibold el 21 de Ag. de 2014
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Productos

Etiquetas

Preguntada:

Dan
el 20 de Ag. de 2014

Editada:

dpb
el 21 de Ag. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by