how to plot image signal ?

7 views (last 30 days)
Tim Usen
Tim Usen on 22 Jan 2019
Answered: Brian Hart on 22 Jan 2019
The code below was given
RGB = imread('flowers.jpg');
RGB1 = imadd(RGB,50);
RGB2 = imsubtract(RGB,100);
RGB3 = imadd(RGB,150);
and all I needed was to create four subplots,and plot variables RGB, RGB1, RGB2, and RGB3 which I did below,
but it didn't work.
subplot(2,2,1);plot(RGB);title('RGB')
subplot(2,2,2);plot(RGB1);title('RGB1')
subplot(2,2,3);plot(RGB2);title('RGB2')
subplot(2,2,4);plot('RGB3');title('RGB3')
As I understood I need to plot three dimension image but I don't how.
Can anyone help me with this code?

Answers (1)

Brian Hart
Brian Hart on 22 Jan 2019
Hi Tim,
Try replacing "plot" with "imshow". Also need to remove the quotes from the second command in the last line...
subplot(2,2,1);plot(RGB);title('RGB')
subplot(2,2,2);imshow(RGB1);title('RGB1')
subplot(2,2,3);imshow(RGB2);title('RGB2')
subplot(2,2,4);imshow(RGB3);title('RGB3')
untitled.bmp

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!