필터 지우기
필터 지우기

To save contents of webpage into text file.

조회 수: 1 (최근 30일)
Priya
Priya 2013년 6월 6일
I have following weblink:
Kindly open this weblink to see the contents.
I wish to save the ONLY CERTAIN PARTS of this file in a text file.
Desired content to be saved in a text file with spaces wherever present in original text:
STARPLKSVD YEVFGRVQGV CFRMYAEDEA RKIGVVGWVK NTSKGTVTGQ
TTS EEEEE EEEE TTS TTHHHHHH HHHT EEEEE TT EEEEE
VQGPEEKVNS MKSWLSKVGS PSSRIDRTNF SNEKTISKLE YSNFSVRY
EEEEHHHHHH HHHSSSS SSS EEE EEEEEESS SSSEEEE
Secondly, we can see there are spaces after every tenth character in all lines. I would like to remove only these spaces which occur after every tenth character and save this content in a text file.
Is it possible ? Can any one help in this regard ?
My output should look like:
STARPLKSVDYEVFGRVQGVCFRMYAEDEARKIGVVGWVKNTSKGTVTGQ
TTS EEEEEEEEE TTS TTHHHHHHHHHT EEEEE TT EEEEE
VQGPEEKVNSMKSWLSKVGSPSSRIDRTNFSNEKTISKLEYSNFSVRY
EEEEHHHHHHHHHSSSS SSS EEEEEEEEESS SSSEEEE

답변 (1개)

Walter Roberson
Walter Roberson 2013년 6월 6일
urlwrite(). Then read in the resulting file and process it.
  댓글 수: 2
Priya
Priya 2013년 6월 7일
Hi thanks for reply.
I tried both urlread and urlwrite earlier, but they give following error:
??? Error using ==> urlwrite at 140 Error downloading URL. Your network connection may be down or your proxy settings improperly configured.
I checked all my proxy settings, did not figure out anything to fix this error.
Walter Roberson
Walter Roberson 2013년 6월 7일
It works for me.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by