Creating a heatmap of area from two equal matrices

2 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Muskan
Muskan il 20 Feb 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.

Categorie

Scopri di più su Data Distribution Plots in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by