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