フィルターのクリア

how to output 4 different windows consisting of the 3 subplots

3 ビュー (過去 30 日間)
Franklin Aaron
Franklin Aaron 2021 年 10 月 11 日
回答済み: Mehran 2023 年 8 月 31 日
clc
clear
set(gcf,'WindowState','maximized')
%% there are 4 images with the names Figure1,Figure2,Figure3,Figure4 .
for X = 1 : 4
jpegFileName = strcat('Figure', num2str(X), '.jpeg');
if isfile(jpegFileName)
imageData = imread(jpegFileName);
else
fprintf('File %s does not exist.\n', jpegFileName);
end
figure(1) ;
for plotId = 1 : 4
subplot(1, 3, plotId) ;
plot(x{plotId}, y{plotId}) ;
end
subplot(1,3,1)
imshow(Lane);
title('1.ORIGINAL')
%% Convert image to Grey for edging.
subplot(1,3,2)
grey1=rgb2gray(Lane);
imshow(grey1);
title('2.GREY ')
%% Finds edges using two thresholds to detect strong and weak edges.
subplot(1,3,3)
EDGE1=edge(grey1,'canny',0.5);
imshow(EDGE1);
title('3.EDGING ')
end

回答 (2 件)

Shivam Singh
Shivam Singh 2021 年 10 月 14 日
Hello Franklin,
It is my understanding that you want to know how to output 4 different windows consisting of the 3 subplots/subfigures. You can explore the examples mentioned in the link below:
I hope this helps you.

Mehran
Mehran 2023 年 8 月 31 日
set(gcf,'WindowState','maximized')
%% there are 4 images with the names Figure1,Figure2,Figure3,Figure4 .
for X = 1 : 4
jpegFileName = strcat('Figure', num2str(X), '.jpeg');
if isfile(jpegFileName)
imageData = imread(jpegFileName);
else
fprintf('File %s does not exist.\n', jpegFileName);
end
figure(1) ;
for plotId = 1 : 4
subplot(1, 3, plotId) ;
plot(x{plotId}, y{plotId}) ;
end
subplot(1,3,1)
imshow(Lane);
title('1.ORIGINAL')
%% Convert image to Grey for edging.
subplot(1,3,2)
grey1=rgb2gray(Lane);
imshow(grey1);
title('2.GREY ')
%% Finds edges using two thresholds to detect strong and weak edges.
subplot(1,3,3)
EDGE1=edge(grey1,'canny',0.5);
imshow(EDGE1);
title('3.EDGING ')

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by