Borrar filtros
Borrar filtros

Counting the amount of overlap for 2D surfaces

1 visualización (últimos 30 días)
Barnabas Kovacs
Barnabas Kovacs el 2 de Mzo. de 2021
Comentada: Barnabas Kovacs el 2 de Mzo. de 2021
I have a number of 2D matrices with the same sizes (180x20). They all have NaN values, and ones in certain areas. I would like to create a 3D histogram-like plot that counts the amount of overlap in certain locations, ie where the ones appear the most often. Can this be done with one of the histogram functions, or should I try using for example surf, with a custom color palette?
  1 comentario
Barnabas Kovacs
Barnabas Kovacs el 2 de Mzo. de 2021
Nevermind actually, I realized I can just add them together, and plot the new surface :D

Iniciar sesión para comentar.

Respuestas (1)

KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Mzo. de 2021
This way:
a=1:20;
b=1:180;
[x,y]=meshgrid(a,b);
data=randi(100,[180,20,20]);
tiledlayout(5,4);% 20 Plots
for i=1:20
nexttile,surf(x,y,data(:,:,i));
end
It is quite difficult to observe the overlap (based on observation) between surfaces by eye directly. Have you looked for a mathematical model? Like find the difference between each surface or the euclidian distance or any correlation between them (2D array case)

Categorías

Más información sobre Surface and Mesh 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!

Translated by