Creating a heatmap of area from two equal matrices
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have two equal matrices which represent values of 'phase' and 'speed' where each value represents an equal area of a grid.
How would I create a heatmap to show (%) of total area with one matrix on the x and one matrix on the y?
Thanks.
0 comentarios
Respuestas (1)
Muskan
el 20 de Feb. de 2023
As per my understanding, we can follow the following steps:
1) Each matrix’s values should be normalised so that they fall between 0 and 1. We can use “mat2gray()” function for this.
2) The “hist3()” function can be used to produce a 2D histogram from the two matrices. A bivariate histogram is produced by this function with a predetermined number of bins in each dimension.
3)Convert the counts in the histogram to percentages of the entire area.
4) Use the “imagesc()” function to create a heatmap of the percentage of data.
0 comentarios
Ver también
Categorías
Más información sobre Data Distribution Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!