Pregunta

I am using quantile function in the simplest form:

x = [1.2,3,4,5];
y = quantile(x,0.5);

But I get the error:

Undefined function 'quantile' for input arguments of type 'double'.

I was not having this error in MATLAB R2009a but get this error in R2012a. What could be the reason?

¿Fue útil?

Solución

Please run:

license('test', 'Statistics_Toolbox')

In case this returns a 0 then you do not have an active license of the statistics toolbox.

However if you want to use it as in your example the following code would do:

y = median(x);

Otros consejos

quantile is part of the statistics toolbox. If you do not have access to that in your new installation, you will not be able to use the function.

To check which toolboxes you have installed, type ver at the command prompt.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top