필터 지우기
필터 지우기

exctract column from files

조회 수: 3 (최근 30일)
ACICY
ACICY 2019년 12월 13일
답변: Guillaume 2019년 12월 13일
Hello so from this file i need distract only this information wich is shown belown
5657.119 N 02404.880

답변 (2개)

Guillaume
Guillaume 2019년 12월 13일
Simply use readtable which has no problem parsing the file:
locations = readtable('New Text Document.txt');
locations.Properties.VariableNames([3 5]) = {'Latitude', 'Longitude'}

Bhaskar R
Bhaskar R 2019년 12월 13일
편집: Bhaskar R 2019년 12월 13일
data = importdata('New Text Document.txt');
x = cellfun(@(x)strsplit(x, ','), data, 'UniformOutput', false);
result = cell2mat(cellfun(@(in)strjoin(in([3:5])), x, 'UniformOutput', false));

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by