Effacer les filtres
Effacer les filtres

exctract column from files

1 vue (au cours des 30 derniers jours)
ACICY
ACICY le 13 Déc 2019
Hello so from this file i need distract only this information wich is shown belown
5657.119 N 02404.880

Réponses (2)

Guillaume
Guillaume le 13 Déc 2019
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 le 13 Déc 2019
Modifié(e) : Bhaskar R le 13 Déc 2019
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));

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by