Hi The .txt file is as such
Name Lon Lat
xxxx 12.111 15.1122
It continues for seven rows. How to read this file using fileID and formatspec ?? I want to read these 3 columns and write into 3 separate data arrays. Please help.

 Akzeptierte Antwort

Stephen23
Stephen23 am 25 Mär. 2016
Bearbeitet: Stephen23 am 25 Mär. 2016

0 Stimmen

fid = fopen('filename.txt','rt');
C = textscan(fid,'%s%f%f','headerlines',1);
fclose(fid);
name = C{1};
LatN = C{2};
LonN = C{3};

Weitere Antworten (0)

Gefragt:

Add
am 25 Mär. 2016

Bearbeitet:

am 25 Mär. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by