SRTM data scanning with matlab
2 views (last 30 days)
Show older comments
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?
0 Comments
Answers (0)
See Also
Categories
Find more on Text Files in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!