Creating a function which creates a subplot

1 回表示 (過去 30 日間)
Jhangir
Jhangir 2013 年 11 月 5 日
コメント済み: Image Analyst 2013 年 11 月 5 日
I want to create a function that will create a subplot, in the subplot the first box will be the orignal image, the second box will be the red dimension of the image or the first matrix, the third green, and last one blue. I am getting 4 empty boxes when I run it also when I put in
Display_RGB_subplots(a,1,cow,cat,dog,doggie)
Undefined function or variable 'cow'.
it gives me that error but when I do
Display_RGB_subplots(a,1,2,3,4,5)
ans =
0.0017
I get that.
Anyways here is my function
function[y1,y2,y3,y4] = Display_RGB_subplots(pic, figurenum, title_1, title_2, title_3, title_4);
y1 = image(pic);
y2 = image(pic(:,:,1));
y3 = image(pic(:,:,2));
y4 = image(pic(:,:,3));
subplot(2,2,1);
plot(y1);
title(title_1)
subplot(2,2,2);
plot(y2);
title(title_2)
subplot(2,2,3)
plot(y3);
title(title_3)
subplot(2,2,4)
plot(y4);
title(title_4)
figure(figurenum)
  2 件のコメント
Jhangir
Jhangir 2013 年 11 月 5 日
Image analyst where are you brah
Image Analyst
Image Analyst 2013 年 11 月 5 日
I was creating a super nice demo for you.

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2013 年 11 月 5 日
See my attached demo that does this.

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by