필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
ocsse
ocsse 2018년 4월 4일
답변: ocsse 2018년 4월 4일
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

채택된 답변

ocsse
ocsse 2018년 4월 4일
try this:
executionTime{1,1} % print the first column of the file
executionTime{1,2} % print the second column of the file

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Code Execution Profiling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by