Is there a readfile() function in Matlab?

조회 수: 14 (최근 30일)
Nat Person
Nat Person 2020년 12월 28일
댓글: Nat Person 2020년 12월 28일
I'm going through an old research assistant's matlab code that was supposed to process files for raw data, plot the found data, and then save the figures as images.
In their code they use a function called readfile()
A=readfile(FinalM);
n_start=0;n_end=-1;
for n=1:numel(A)
if strcmpi(A{n},'[data]'),n_start=n+1;end
if n_start>0 && n>=n_start && ~any(A{n}(1)=='-0123456789')
n_end=n-1;break
end
end
From what I can tell (because they didn't document their work....) Matlab does not have a built in function readfile(), so I assume this is a function someone created and is available online
Can someone let me know if readfile() is a thing and/or if there is a function that would work better at opening a text file, scanning each line to find where the data starts, and then importing the data found into a 2 column matrix (x & y data)
Thanks for any help you can give. I am a lowly undergraduate just embarking on their journey with MATLAB, so I apologize in advance

채택된 답변

Stephen23
Stephen23 2020년 12월 28일
편집: Stephen23 2020년 12월 28일
Perhaps they meant this third-party function:
To get a copy either click the big blue "Download from GitHub" button or you could use the install add-ons feature of the MATLAB IDE:
  댓글 수: 1
Nat Person
Nat Person 2020년 12월 28일
Ahhh I believe you're right. Thank you!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Call Web Services from MATLAB Using HTTP에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by