I have a matrix X of size m,n. I need to find out the 97.5 percentile and 2.5 percentile of ALL (not column wise) the values in the matrix. I am using the command
prctile(X,[97.5],'all')
as directed in https://in.mathworks.com/help/stats/prctile.html#mw_35ce46ee-d9b3-4bb7-8a69-d5a1ac746429 . However I am getting the followig the error message:
Error using :
For colon operator with char operands, first and last operands must be char.
Error in prctile (line 69)
perm = [dim:max(nDimsX,dim) 1:dim-1];
My Matlab version is R2018a and I have the Statistics Toolbox
Please help
PS. I looked into the prctile function in Matlab to resolve the error and found that this function does not process the 'all' string anywhere inside the function. I might be wrong.
Best Answer