MATLAB: I’m a beginner at Matlab, I need some help.

and add it in a picture?how to make a blue image?how to make the rectangle its color pink

Best Answer

clear all;
close all;
clc;
figure (1);
i=imread('fabric.png');
imshow(i);
figure (2);
Iind=[2 2 2;2 2 2;2 2 2];
map=[0.5 0.5 0.5;0 0.6 1;1 0 0];
imshow(Iind,map,'InitialMagnification','fit'),
figure (3);
A= gcf;
A.Color = [1 0.4 0.6];