Plotting latitude, longitude,and signal strength

I have a list of latitude and longitude along with signal strength obtained from mobile towers in a certain region. I have all the data in CSV format. In total, I have 4 CSV files.
How can I plot that data in MATLAB?
As a range of signal strength will be shown by different colour and other range will be shown in different colour.

2 Comments

For a color variance like that I would suggest looking into contour().
Okay thank you, i will look into that function,,basically I want to show difference in signal strength with respect to different lat and long

Sign in to comment.

 Accepted Answer

Read about pcolor, surf, scatter, conourf. All these can be used to plot what you want.
The below link shows the possible plots which can be obtained from MATLAB. YOu can have a look on the link, it has a plot and respective code from which you can learn.

8 Comments

Thank you so much, will look into the plots.
how do i convert my csv file to mat file?
Attached here is my csv file
[num,txt,raw] = xlsread('powerlevel.csv') ;
lat = num(:,1) ;
lon = num(:,2) ;
val = num(:,3) ;
scatter(lon,lat,10,val,'filled') ; colorbar
strength is the output to the program you gave,, thank you.
I am also looking to get some output like the one attached type1,, for that I need to convert csv file to .mat file
YOu have any other data? Or the only above data? The second figure is plotted using contour.
only the above data.
I treid it with contour.
But error is coming
*Error using contour (line 81)
Z must be size 2x2 or greater.
Error in sigstrength (line 5)
contour(Longitude, Latitude, Power, 8)*
Attached here is my csv file, .mat file and .m file
To use contour you should be having a matrix data. With your data..this is what I can get:
[num,txt,raw] = xlsread('powerlevel.csv') ;
lat = num(:,1) ;
lon = num(:,2) ;
val = num(:,3) ;
scatter(lon,lat,10,val,'filled') ; colorbar
m = 100 ;
x = linspace(min(lon),max(lon),m) ;
y = linspace(min(lat),max(lat),m) ;
[X,Y] = meshgrid(x,y) ;
Z = griddata(lon,lat,val,X,Y) ;
contour(X,Y,Z) ;
Okay thank you so much,, will try to modify it as much as i can.
Thank you.

Sign in to comment.

More Answers (1)

A new feature is available in R2020a to support importing and visualizing propagation data like this. The feature is available in Communications Toolbox and Antenna Toolbox and supports table-based files or data which contains latitude, longitude, and corresponding values like signal strength. You can learn about the feature here, and below is an example contour map that you can create with it:

Categories

Products

Community Treasure Hunt

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

Start Hunting!