How to highlight a certain pixel when using the imagesc command?

조회 수: 15 (최근 30일)
I have a small 3-by-7 matrix which I have plotted using the imagesc() function to get a small map of an area of data.
Is there any way to be able to highlight a certain pixel with a red outline or something similar?
Many thanks!

채택된 답변

Sai Veeramachaneni
Sai Veeramachaneni 2020년 3월 20일
You can use something similar to below code.
imagesc(floor(rand(3,7)*10))
hold on
plot([2.5,2.5,3.5,3.5,2.5],[3.5,2.5,2.5,3.5,3.5],'r','linewidth',3)
hold off

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by