Kind of late, but just so an answer is shown.
If you are missing a function that should be there... As in this case, where the double version of sortrows suddenly seems to have disappeared.
First, verify if the function exists on the search path. In my MATLAB, there are multiple versions of sortrows, several of which I wrote myself. So you can see a VPI version, and one in my VPIJ toolbox. But all of the other sortrows versions all came from MATLAB.
Most importantly, there should be the basic double precision version of sortrows. This is the default version that MATLAB will lookfor. It SHOULD have been in the datafun directory, provided with MATLAB.
How did I know to look for the double precision version? Re-read the error message. It told you what to look for.
"Undefined function 'sortrows' for input arguments of type 'double'."
Every other version of sortrows is for various alternative classes. The one that has no class associated with it is the one in datafun.
So you should verify several things. If which did not fund sortrows in the datafun directory, then you might look to see if sortrows has been moved from that directory, or if that file was deleted by accident. Note that you should NEVER move files out of the directory that came from as installed by MATLAB, but things happen by accident.
Another possibility is you may have accidentally removed the datafun directory from your search path. This would have been a bad mistake to make, since that directory would have many valuable functions in it. So I would verify that directory does lie on your search path. If not, this is easily repaired, using either addpath or pathtool. Then save your path, and all will now work.
In the worst case, where either the directory itself or the function sortrows has been accidentally deleted, now the simplest way to recover is to re-install a fresh copy of MATLAB. But first, I might spend a little time doing a disk verification step, using whatever utility that is appropriate for your OS. This is because if directories or files have suddenly disappeared from your hard drive, if this is happening because your system is corrupted, that is a major problem. Fix any corruption issues you may find, before you re-install MATLAB. It is not a bad idea to check your system periodically anyway. Then finally, just do a re-install of MATLAB. This is pretty fast to do, especially if you have a fast internet connection. You might as well make sure you have the latest release anyway.
At the very end, if you do a re-install, you will then need to add any of your private directories back onto your new search path.