Read text file and append

조회 수: 5 (최근 30일)
Sergio
Sergio 2013년 8월 29일
How do i read a text file from line x to line y, and store in a new text file? Also how can i create a new text pile by appending 3 different text files?

채택된 답변

Image Analyst
Image Analyst 2013년 8월 29일
It's a really really easy and straightforward adaption of the answer I gave in http://www.mathworks.com/matlabcentral/answers/85961#answer_95486 and you should have no trouble now doing this yourself. Just have another loop in the beginning where you read and throw away/ignore the first x-1 lines and quit reading when your line counter gets to y. A smart engineer like you should be able to do it in 2 minutes.
  댓글 수: 1
Sergio
Sergio 2013년 8월 30일
Thank you!
I solved the first part. I'm working now on outputting the text files together into a single text file.
Final file= output1 + Output2 + output3
Will see how far my engineering brain takes me :) Sorry been using matlab to edit text files for two weeks know. I'm at the rookie level.
Thanks again!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by