using data from a .txt file in matlab

1 Ansicht (letzte 30 Tage)
Biza Ferreira
Biza Ferreira am 25 Okt. 2018
Kommentiert: madhan ravi am 26 Okt. 2018
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 Kommentar
madhan ravi
madhan ravi am 26 Okt. 2018
Is the commas in the file represent dots?

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Abdul Rehman
Abdul Rehman am 25 Okt. 2018

Biza Ferreira
Biza Ferreira am 26 Okt. 2018
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

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by