필터 지우기
필터 지우기

Creating Graphical User Interface for a Code

조회 수: 2 (최근 30일)
Pranjal Pathak
Pranjal Pathak 2013년 7월 18일
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