Quantile function causing error in MATLAB
문제
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?
해결책
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);
다른 팁
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.
제휴하지 않습니다 StackOverflow