Creating Graphical User Interface for a Code

1 次查看(过去 30 天)
Hi,
Here I am adding a simple code:
mx=20; my=5;
[x,y]=meshgrid(-1:2/127:1, -1:2/127:1); circ=sqrt(x.^2+y.^2)<1; H=circ.*(cos((x*pi*mx)+(y*pi*my)))>0;
figure(1) imagesc(H); colormap gray; axis image; axis off
%Fourier Transform z=fft2(H, 512,512); m=fftshift(z); q=abs(m);
figure(2) imagesc(q); colormap gray; axis image; axis off
I have no idea how to make a GUI out of this code so that I have the value of 'mx' and 'my' as input and the figures as output in Matlab. Can anyone help me in this regard?
Thanking You!

回答(1 个)

Chad Gilbert
Chad Gilbert 2013-7-18
编辑:Chad Gilbert 2013-7-18
If you are new to MATLAB GUI programming, your best bet is to use GUIDE. Type 'guide' on the MATLAB command line to begin. There are many tutorials listed here: https://www.mathworks.com/matlabcentral/answers/30070-gui-guide-tutorials
Good luck!

类别

Help CenterFile Exchange 中查找有关 Graphics Object Properties 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by