SRTM data scanning with matlab

2 views (last 30 days)
Jakub Provazník
Jakub Provazník on 7 Nov 2013
Hi I have a problem with loading od data array (example of format: 10.9995836802664.48.9995836802664.530).
filename = 'C:\Users\Documents\coordinates\N51E011.txt';
delimiter = ',';
formatSpec = '%f%f%f%f%f%[^\n\r]';
fileID = fopen(filename,'r');
dataArray = textscan(fileID, formatSpec, 'Delimiter', delimiter, 'ReturnOnError', false);
fclose(fileID);
X = dataArray{1};
Y = 1e2*dataArray{2}+dataArray{3};
Z = 1e3*dataArray{4};
%
save N51E11 X Y Z
There is a problem with "dataArray{4}", because sometimes value is smaller than 100 for example 93 imports 930. It is the same problem with values above 1000. Any advise how to do that?

Answers (0)

Community Treasure Hunt

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

Start Hunting!