Generate a geographical heat map
Show older comments
Hello,
I am trying to generate a heat map on mapping toolbox.
Here I have the coordinates of the centers in my grid:
Lat = 54.2 + 0.1/6 * [11 9 7 5 3 1]' * ones(1,3) ;
Lon = 9.15 + 0.025 * ones(6,1) * [1 3 5] ;
coord = [ [Lat(:,1) , Lon(:,1)] ; [Lat(:,2) , Lon(:,2)] ; [Lat(:,3) , Lon(:,3)] ] ;
So coord is a 18 by 2 matrix, referring to the coordinates of 18 points.
Let us assume I want to assign a random value to each point, then I can define
values = rand(18, 1) .
How can I generate a heat map with such values in such locations?
How can I make each 'pixel' of the heat map like a sqare with size 0.05 by 0.033 degrees in longitude and latitude?
Thank you in advance for your help :)
2 Comments
Adam Danz
on 20 Jan 2021
A heatmap is a deptiction of 3D data in a 2D plane. Your Lat and Lon coordinates define the 2D plane but the 3rd dimension is missing in your description. The "values" vector is 1D so it's unclear how it should map onto the 2D surface of the heatmap.
Maurilio Matracia
on 20 Jan 2021
Accepted Answer
More Answers (1)
Sami
on 16 Mar 2025
0 votes
if true % code end% Define circuit parameters L = 1; % Inductor (H) C = 1; % Capacitor (F) R = 1; % Resistor (Ohm)
% Define the transfer function num = [1]; % Numerator den = [L*C, R*C, 1]; % Denominator
H1 = tf(num, den);
% Display the transfer function disp('Transfer Function of RLC Circuit:'); H1
% Plot Bode plot to analyze frequency response bode(H1); grid on; title('Bode Plot of RLC Circuit');
Categories
Find more on Geographic Plots 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!

