feof to loop through lines of data?
조회 수: 4 (최근 30일)
이전 댓글 표시
Hey, so i'm supposed to have a file called xypts with data like below where everything is spaced one apart.
z 0 y 1
z 4.6 y 2.2
z 6.8 y 6
z 8.1 y 7.4
I have to use a while loop and fgetl to read each line as a string. In the loop, it creates z and y vectors for the data points. It will loop until the end of the file is reached. The number of points should be in the plot title.
댓글 수: 2
Image Analyst
2014년 12월 5일
OK. Good luck with that. There are examples in the help for fgetl() and sscanf() to help you.
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Function Creation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!