(1) Your code for qdwh.m provides options for column pivoting and row sorting and your usage comments indicate that you can have either one of: 'rc', 'c', or '' such that you have both row sorting and column pivoting, only column pivoting, or none, respectively. However, within the code your use strfind and it seems that you could also have simply 'r' for row sorting only. Is this a valid option as well?
(2) Within qdwh.m, if row sorting is enabled, I believe that the if statement which performs the row sorting should also contain the following: Uprev = U; since you have changed U and then when you jump into the while loop, your check of norm(U-Uprev, 'fro') would most often be greater than tol3.
In order to use this with pentagrams, the following line needs to be added within the 'pentagram' and 'p' cases:
markers_edge{i} = '\large{$\bigstar$}';
Otherwise, the symbols fail to show up in the legend.