MATLAB Answers

How to convert RGB gcf to grayscale gcf ?

27 views (last 30 days)
도현 김
도현 김 on 29 Mar 2021
Commented: KSSV on 29 Mar 2021
h = rand(10)
heatmap(h)
i want to using 'rgb2gray' without using imread.
The mechanism I want is to create heatmap and set it in set(gcf,~~~~).
How can I do it ?

Accepted Answer

KSSV
KSSV on 29 Mar 2021
h = rand(10)
heatmap(h) ;
colormap(gray)
  2 Comments
KSSV
KSSV on 29 Mar 2021
If you have the values..you can striaght away use them with colormap. Read about it.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by