a_anis3000

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)
```

ASKER CERTIFIED SOLUTION

membership

Create an account to see this answer

Signing up is free. No credit card required.