How to use multiple popup menu in a GUI?

3 次查看(过去 30 天)
I have a picture that i want to split it .i wrote below code.
for example if i want to split picture into 5X3 just i should put X=5 and y=3 in that. but i want to do that by GUI.
i created two pop-up menu for selecting number of rows(1-10) and column(1-10) in GUI, but i don't know how can i manage this code whit two pop-up menu in GUI? TQ
%if
%end
clear
rgbImage=imread('C:\safa\flower1.jpg');
x=7;y=8;
[rows columns numberOfColorBands] = size(rgbImage);
interval1=floor(columns/y);
interval2=floor(rows/x);
for i=0:y-1
val1(i+1)=1+(i*interval1);
end
for j=0:x-1
val2(j+1)=1+(j*interval2);
end
val1(1,end)=val1(1,end)-1;
val2(1,end)=val2(1,end)-1;
kk=0;
for jj=1:x
for ii=1:y
kk=kk+1;
q(:,:,:,kk)=imcrop(rgbImage, [val1(ii) val2(jj) interval1 interval2]);
end
end
for jjj=1:x*y
subplot(x,y,jjj)
imshow(q(:,:,:,jjj))
end

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Migrate GUIDE Apps 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by