Counting the amount of overlap for 2D surfaces

1 次查看(过去 30 天)
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 个)

KALYAN ACHARJYA
KALYAN ACHARJYA 2021-3-2
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)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by