How to use matlab to get data from web

I tried to do this by writing this code but it returns 'Access denied due to security policy violation'.
I have 3 questions:
How to solve the 'Access denied due to security policy violation' problem?
How can I cut the data I want after urlread?
Is there any other methods to cut data from web besides urlread?
Please help. Thanks.
for a = 7:10
    for b = 1:12
        if a < 10
            a1 = ['0' int2str(a)];
        else a1 = int2str(a);
        end
        if b < 10
            b1 = ['0' int2str(b)];
        else b1 = int2str(b);
        end
        url = sprintf ('http://www.cuhk.edu.hk/bursary/eng/public/payroll_benefits/mpf/investment_performance/ipme%s%s.html Menu=ChildMenu8\n',a1,b1)
         s = urlread(url)
    end
end

Open in new window

stacey25Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yuk99Commented:
I checked the site. You url was incorrect. Space instead of # before Menu.
Also you don't have to convert numbers to string before sprintf and worrying about trailing 0. %20d format will take care of that. See the code below.
for a = 7:10
    for b = 1:12
        url = sprintf ('http://www.cuhk.edu.hk/bursary/eng/public/payroll_benefits/mpf/investment_performance/ipme%02d%02d.html#Menu=ChildMenu8\n',a,b)   
        s = urlread(url);
    end
end

Open in new window

0
yuk99Commented:
Sorry, mistyped. %02d, of course.
0
yuk99Commented:
0
Challenges in Government Cyber Security

Has cyber security been a challenge in your government organization? Are you looking to improve your government's network security? Learn more about how to improve your government organization's security by viewing our on-demand webinar!

yuk99Commented:
To extract data from html document, you can use REGEXP function to apply regular expressions.

For complex html parsing his toolbox might be usefull:
http://www.artefact.tk/software/matlab/template/
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stacey25Author Commented:
Thank you but your answer is too short
0
yuk99Commented:
You could ask me additional questions if the answer is not enough for you, rather than giving C grade. Or you could wait for other answers. I believe for 125 points the answer was appropriate.
0
stacey25Author Commented:
sorry, I am a new user and don't know how to rate appropriately.
Really sorry~
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.