It's even less adequate for your task of following links, you really need something that is going to parse the html and give you access to the document object model (DOM) and navigate the DOM instead. Unfortunately, as far as I know there's no such tool in matlab (as that's complex).
A poor man option would be to search for '<a href' in your downloaded html but that would be very fragile:
url = "https://en.wikipedia.org/wiki/Quantum_mechanics";
A = webread(url);
suburls = regexp(A, '<a\s+href=\s*["''][^>]*>', 'match');
islocal = contains(suburls, '#');
otherpages = suburl(~islocal);
But this is very fragile (e.g. an attribute between the a and href will stop the link being detected). Again, if you want something reliable you'll need an html parser.