Effacer les filtres
Effacer les filtres

Creating Graphical User Interface for a Code

2 vues (au cours des 30 derniers jours)
Pranjal Pathak
Pranjal Pathak le 18 Juil 2013
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!

Réponses (1)

Chad Gilbert
Chad Gilbert le 18 Juil 2013
Modifié(e) : Chad Gilbert le 18 Juil 2013
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!

Catégories

En savoir plus sur Graphics Object Properties dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by