Reading in a text file to an array without matlab functions
이전 댓글 표시
I have a text file containing data in this format. There are four coloumn with over 400 lines and varying datatypes
col1 col2 col3 col4
int string dec string
int string dec string
int string dec string
How would I go about reading this into an array without using matlab functions such as textscan. I assume it would be some kind of loop, but I'm really not sure
Thank you
댓글 수: 3
dpb
2020년 12월 5일
Why? Homework? What is end purpose/object?
Barry Smith
2020년 12월 5일
dpb
2020년 12월 5일
What is actual text of the question as posed, then?
And we typically don't solve HW problems directly but will answer specific questions on syntax or other areas once have seen the effort put in first.
답변 (1개)
Cris LaPierre
2020년 12월 5일
0 개 추천
You must have been given some direction as to how to do this. There is no way to read it in without using at least some MATLAB functions. Look up the functions you can use in the documentation to learn how to do this. A good starting place might be the low-level file I/O page.
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!