One unexpected thing with this code. Suppose I have a Y vector and want to regress it on one explanatory variable, but also include a constant in my regression. Then my X matrix has 2 columns, the first column is just ones, the second is the explanatory variable. It should still be possible to plot this along with the results from the regression.
Currently, however, if you run:
quantreg([ones(length(x),1) x], y,.5)
You get an error because it tries to plot it, but order has been set (line 44) to [], so things get messed up.
Additionally, the plots that do get produced look odd because the default is to draw lines between all of the points, which usually isn't what you want. For example, this doesn't look like what it should:
x=randn(1000,1);
y=1+5*x+randn(1000,1);
quantreg(x,y,0.5)
Finally, there's a problem with the error checking of inputs (lines 41-47) because it's all one big if-else statement. If you only put in three inputs, then line 44 runs and order gets set to [], but then the program exits the if-else statement and so Nboot never gets set correctly. You should split these up into separate if statements because if there are only 3 inputs then you need to set both order and Nboot.
I was tempted to rate this lower, but it is an interesting code, transforming definite integrals over infinite domains to more manageable problems.
It fails in its help, which is poor. I found an inadequate description of the parameters. I found only limited error checks. I found no examples of use. I did find a superfluous number of %%%% symbols. The author might have spent more time on the help, and less effort holding his finger down on the % key.
The H1 line was missing. What is an H1 line? It is the very first line of the help block in your function. It enables the lookfor functionality in matlab. The author apparently has never looked closely at the help blocks for the codes that come from the MathWorks. When someone wants to remember the name of your function next year, how will they find it? They might try to use lookfor, but it will find nothing from this code.