필터 지우기
필터 지우기

using data from a .txt file in matlab

조회 수: 1 (최근 30일)
Biza Ferreira
Biza Ferreira 2018년 10월 25일
댓글: madhan ravi 2018년 10월 26일
Hello friends, I have a fews problems, I have a text file and inside have some data disposed in columns. I want to load some columns, now my problem is how to bring the columns that I need? This is my file.
  댓글 수: 1
madhan ravi
madhan ravi 2018년 10월 26일
Is the commas in the file represent dots?

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

답변 (2개)

Abdul Rehman
Abdul Rehman 2018년 10월 25일

Biza Ferreira
Biza Ferreira 2018년 10월 26일
Thanks for your reply I ended up making the following code, but it does not bring me all the data.Can someone help me?
if true
%
[filename pathname]= uigetfile({'*.txt'},'Select .txt file');
fullpathname = strcat(pathname, filename);
app.locationFile.Value = fullpathname;
textLocalization = fopen(fullpathname,'r');
mesurements = textscan(textLocalization,'%d %d %d %f %d','HeaderLines',3,'Delimiter',' ');
fclose(textLocalization);
disp(mesurements)
end

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by