- You can use rectangle() to draw on the display.
- You can use the Computer Vision function insertShape() to write into an array (probably displaying the array later)
- You can use assignment statements to write into an array (probably displaying the array later)
Highlighting a portion of an image created from a matrix using "pcolor"
5 次查看(过去 30 天)
显示 更早的评论
I have created an image to visualize a matrix I have using pcolor function. The plot is shown below. I want to highlight elements of the matrix located in the range [65 95] using a square frame or anything else. I have created a square around this area manually but it is not perfect. Any idea?
Thanks
0 个评论
采纳的回答
Walter Roberson
2019-3-4
xloc = 65:95;
yloc = 65:100;
YourArray(yloc, xloc([1 end]), :) = 255; %left and right edges
YourArray(yloc([1 end]), xloc, :) = 255; %top and bottom edges
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Axis Labels 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!