Plotting a Limited Number of Longitude and Latitude Data on Map

1 回表示 (過去 30 日間)
Matthew Hayden
Matthew Hayden 2011 年 11 月 20 日
編集済み: Sushranth 2021 年 6 月 28 日
Hi, I'm very new to Matlab and I'm wondering if anyone could give me a little help. I have 1 value each for 20 different long/lat points surrounding Madagascar and I'd like to plot these on a map.
I've tried using the scatterm plots with no joy. I think it could be possibly because of the format of my data. I have 3 seperate .CSV files, one with longitude, one with latitude and one with corresponding wave energy values.
Any help will be hugely appreciated. Thanks a lot. Matt

回答 (1 件)

Sushranth
Sushranth 2021 年 6 月 28 日
編集済み: Sushranth 2021 年 6 月 28 日
I will assume that each csv file contains only one column. After reading from the file, change it's format to an array and then plot using scatterm.
lat = readtable("latitude.txt");
lat = table2array(lat);
lon = readtable("longitude.txt");
lon = table2array(lon);
wave = readtable("waveenergy.txt");
wave = table2array(wave);
scatterm(lat, lon, 5, wave);
For more details on scatterm, check the below link:-

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by