Read files with lat Long values ?

1 回表示 (過去 30 日間)
Adrij Roy
Adrij Roy 2019 年 2 月 18 日
編集済み: per isakson 2019 年 2 月 18 日
Hello everyone,
I got a problem with reading files from a directory which has files named as data_lat_lon.
The data analysis part is for different districts which have more than latitude & longitude values.
If only one lat/long pair were there, it would be simpler to relate each pair wit other data such as temperature.
But for different lat/long pairs for a district, I need to create a for loop which will run through
y = 1:length(either lat or long).
The files will be searched from the directory as:
dlmread('H\Adrij\documents\data_','_',lat{y,1},'_',lon{y,1})
I am getting serious error!

回答 (1 件)

per isakson
per isakson 2019 年 2 月 18 日
編集済み: per isakson 2019 年 2 月 18 日
The comma delimited list of character vectors
'H\Adrij\documents\data_','_',lat{y,1},'_',lon{y,1}
must be replaced by ONE string (or character vector). (I assume that lat and lon contain array vectors.) Enclose the list in brackets to concatenate the pieces
['H\Adrij\documents\data_','_',lat{y,1},'_',lon{y,1}]

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by