필터 지우기
필터 지우기

How to use image sc and contour?

조회 수: 2 (최근 30일)
keith lin
keith lin 2013년 3월 14일
Let's say I have a random 2000 by 2000 matrix. Numbers range from 1 to 1000
I want to be able to use imagesc(matrix) then with a yellow contour if the number is between 500 to 550. How to do it?

답변 (1개)

ChristianW
ChristianW 2013년 3월 14일
n = 20; % 2000 takes long calculation time fot contour
X = randi(1000,n);
[C,h] = contour(X,[400 600]); axis image
set(h,'ShowText','on','LineWidth',2)
colormap([1 0.6 0; 1 0 0]) % own colormap, orange and red

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by