How can I extract data from a heat map using separate point coordinates?
조회 수: 2 (최근 30일)
이전 댓글 표시
I'm using the following code to plot a heat map with separate X,Y coordinates overlaid. The heat map is of flow conditions (time-averaged turbulent kinetic energy, TKE) in a flume, while my overlaid points are fish locations throughout an experiment.
% plot TKE
sa=f19p2hpvcd3;
imagesc((sa.x-0.15),sa.z,fliplr(flipud(sa.meank)),[minval maxval])
set(gca,'YDir','normal')% colormap jet
% colorbar
% xlabel('x ( m )')
axis([xlow xhigh ylow yhigh])
hold on
% plots the scatter points
scatter(a1(:,1),a1(:,2), 'red', 'x')
This creates this:
What I want to do is to use the scatter points that I've overlaid to extract the underlying value on the heat map, and then insert the value into my pre-existing double as a new column, so that each X,Y coordinate is associated with a different TKE value.
Is there a simple way to do this that I'm missing? Thanks in advance.
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Geographic Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!