MATLAB: Kstest2 – Undefined function ‘kstest2’ for input arguments of type ‘double’.

kolmogorov two-sampleMATLABStatistics and Machine Learning Toolbox

Dear I have two vectors ("ano" and "sem") with 31132 data in each. Did data entry, but when I try to use the function kstest2 get an error:
>> H = kstest2 (ano, sem) Undefined function 'kstest2' for input arguments of type 'double'.
Had some guidance about?
Thanks,

Best Answer

Joao - the kstest2 function is part of the Statistics Toolbox. Do you have it installed? In the Command Window type
ver
to see which version of MATLAB you have and which toolboxes you have. If you don't see the Statistics Toolbox, then you need to purchase it. If you do see it, then type the following in the Command Window
which -all kstest2
to see where in the MATLAB search path this function can be found (if at all). What do you observe?