.txt file to a string

조회 수: 2 (최근 30일)
Chace
Chace 2013년 11월 5일
답변: Andy 2013년 11월 5일
I am trying to use "importdata" program to import a txt file, but in order for the importdata to read the file, it must be a string. Is there a way to convert the txt file into a string. The txt file is one column of 1500 different numbers (a graph). Thanks!
  댓글 수: 1
Simon
Simon 2013년 11월 5일
Hi!
Please show the code you tried and a few (!) lines of the file to be read.

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

답변 (1개)

Andy
Andy 2013년 11월 5일
"importdata" will work with a .txt file that is just a series of numbers ie. 1 2 4 5 7 9 8 7 3 0 Using notepad I created a .txt file with those numbers in a single column and importdata read them in as a variable 10 x 1. Is there something unusual about how your .txt file is being stored/created?

카테고리

Help CenterFile Exchange에서 Low-Level File I/O에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by