Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Read text/number file

조회 수: 5 (최근 30일)
Sergio
Sergio 2013년 8월 19일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi,
I have an input file that I want to edit many times before running a program. The different input files represent different scenarios. There is a combination of number and strings. I would like to separate this matrices into variables in order to make computation with them and save the result in a new input file. The file contains many matrices with different sizes. I'm new to matlab and would appreciate any help.
Thanks!
SDH
  댓글 수: 2
dpb
dpb 2013년 8월 19일
doc textscan % and friends
You can do anything w/ a text file you can dream up doing; the specifics of which will all depend on the file organization itself.
There are a number of examples in the documentation of all the i/o functions--perhaps start with
help iofun
and look thru the short description of those available and see what looks closest to what you have in mind as a starting point.
Cedric
Cedric 2013년 8월 19일
편집: Cedric 2013년 8월 19일
Build a small example please, e.g. if you have a file with matrices sizes between 50x50 and 100x100, build an example with 3x3 and 5x5 matrices with the same kind of headers and separators.

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by