exctract column from files

2 ビュー (過去 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 Center および File ExchangeText Data Preparation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by