how can i read all the columns separately from the text file?

1 Ansicht (letzte 30 Tage)
ocsse
ocsse am 4 Apr. 2018
Beantwortet: ocsse am 4 Apr. 2018
this is my code but i don't how can i get each column separately.
% Appendix D1
fid3 = fopen('executionTime.txt');
executionTime = textscan(fid3, '%f %d', 'headerlines', 1);
fclose(fid3);
% executionTime = {1,:};
executionTime{1}{1}
here is executionTime variable:
Thank you

Akzeptierte Antwort

ocsse
ocsse am 4 Apr. 2018
try this:
executionTime{1,1} % print the first column of the file
executionTime{1,2} % print the second column of the file

Weitere Antworten (0)

Kategorien

Mehr zu Text Data Preparation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by