Link to home
Create AccountLog in
Avatar of a_anis3000
a_anis3000Flag for Egypt

asked on

plotting rgb graph in matlab

In the Matlab code below I am trying to extract the r g b colors from an image after which I wish to plot a graph for each. i tried plotting a graph for the red color by typing plot(red) in the last line of code, though the graph doesn't look quite right
img = imread('Desert.jpg');

red = img(:,:,1);
green = img(:,:,2);
blue = img(:,:,3);
plot(red)

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of yuk99
yuk99
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account