⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ofdm_gui.m

📁 i hope use every file i put here to evry one and thank >
💻 M
📖 第 1 页 / 共 2 页
字号:
function varargout = untitled(varargin)% UNTITLED Application M-file for untitled.fig%    FIG = UNTITLED launch untitled GUI.%    UNTITLED('callback_name', ...) invoke the named callback.% Last Modified by GUIDE v2.0 20-Apr-2001 15:29:08global Hif nargin == 0  % LAUNCH GUI	fig = openfig(mfilename,'reuse');	% Use system color scheme for figure:	set(fig,'Color',get(0,'defaultUicontrolBackgroundColor'));       	% Generate a structure of handles to pass to callbacks, and store it. 	handles = guihandles(fig);	guidata(fig, handles);        H = handles;    	if nargout > 0		varargout{1} = fig;	end        % initial conditions    cd c:\splo\pictures    x = imread('ofdm_logo.bmp');    cd c:\splo\data        axes(handles.axes13)    image(x);    axis off    s = make_cell('.wav');    set(handles.popupmenu5,'String',s);    s = make_cell('.bmp');    set(handles.popupmenu6,'String',s);        elseif ischar(varargin{1}) % INVOKE NAMED SUBFUNCTION OR CALLBACK	try		[varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard	catch		disp(lasterr);	endend%| ABOUT CALLBACKS:%| GUIDE automatically appends subfunction prototypes to this file, and %| sets objects' callback properties to call them through the FEVAL%|%| Each callback subfunction declaration has the following form:%| <SUBFUNCTION_NAME>(H, EVENTDATA, HANDLES, VARARGIN)%|%| The subfunction name is composed using the object's Tag and the %| callback type separated by '_', e.g. 'slider2_Callback',%| 'figure1_CloseRequestFcn', 'axis1_ButtondownFcn'.%|%| H is the callback object's handle (obtained using GCBO).%|%| EVENTDATA is empty, but reserved for future use.%|%| HANDLES is a structure containing handles of components in GUI using%| tags as fieldnames, e.g. handles.figure1, handles.slider2. This%| structure is created at GUI startup using GUIHANDLES and stored in%| the figure's application data using GUIDATA. A copy of the structure%| is passed to each callback.  You can store additional information in%| this structure at GUI startup, and you can change the structure%| during callbacks.  Call guidata(h, handles) after changing your%| copy to replace the stored original so that subsequent callbacks see%| the updates. Type "help guihandles" and "help guidata" for more%| information.%|%| VARARGIN contains any extra arguments you have passed to the%| callback. Specify the extra arguments by editing the callback%| property in the inspector. By default, GUIDE sets the property to:%| <MFILENAME>('<SUBFUNCTION_NAME>', gcbo, [], guidata(gcbo))%| Add any extra arguments after the last argument, before the final%| closing parenthesis.% --------------------------------------------------------------------function varargout = pushbutton1_Callback(h, eventdata, handles, varargin)% Stub for Callback of the uicontrol handles.pushbutton1.close% --------------------------------------------------------------------function varargout = pushbutton2_Callback(h, eventdata, handles, varargin)% Stub for Callback of the uicontrol handles.pushbutton2.if length(get(handles.edit8,'String')) == 3 & length(get(handles.edit9,'String')) == 3 & length(get(handles.edit18,'String')) == 3 & length(get(handles.edit12,'String')) == 3 & length(get(handles.edit21,'String')) == 3 & length(get(handles.edit1,'String')) == 3 & length(get(handles.edit3,'String')) == 3    if get(handles.edit8,'String') == 'ahn' & get(handles.edit9,'String') == 'ahn' & get(handles.edit18,'String') == 'ahn' & get(handles.edit12,'String') == 'ahn' & get(handles.edit21,'String') == 'ahn' & get(handles.edit1,'String') == 'ahn' & get(handles.edit3,'String') == 'ahn'    cd c:\splo\pictures        x = imread('ahn.bmp');    axes(handles.axes14)    image(x);    axis off        % clear axes    axes(handles.axes13)    axis off    cla        set(handles.text14,'Visible','off');    set(handles.text18,'Visible','off');    set(handles.text13,'Visible','off');    set(handles.text17,'Visible','off');    set(handles.text15,'Visible','off');    set(handles.text25,'Visible','off');    set(handles.text35,'Visible','off');    set(handles.text34,'Visible','off');    set(handles.text31,'Visible','off');    set(handles.text33,'Visible','off');    set(handles.text32,'Visible','off');    set(handles.pushbutton4,'Visible','off');    set(handles.pushbutton5,'Visible','off');        cd c:\splo\data        else    set(h,'BackgroundColor',[.75 0 0]);    set(handles.text10,'String','0');    set(handles.text38,'Visible','on');    set(handles.axes13,'Visible','off');    axes(handles.axes13)    axis off    cla    set(handles.text27,'String',' ');    set(handles.pushbutton2,'Enable','off');    set(handles.pushbutton6,'Enable','off');    set(handles.pushbutton7,'Enable','on');    set(handles.pushbutton11,'Enable','on');    pause(.000001)    ofdm    pause(.000001)    set(handles.text10,'String','100');    set(handles.pushbutton7,'Enable','off');    set(handles.pushbutton11,'Enable','off');    set(handles.pushbutton2,'Enable','on');    set(handles.pushbutton2,'BackgroundColor',[0 .75 0]);    set(handles.pushbutton6,'Enable','on');        end    else        set(h,'BackgroundColor',[.75 0 0]);    set(handles.text10,'String','0');    set(handles.text38,'Visible','on');    set(handles.axes13,'Visible','off');    axes(handles.axes13)    axis off    cla    set(handles.text27,'String',' ');    set(handles.pushbutton2,'Enable','off');    set(handles.pushbutton6,'Enable','off');    set(handles.pushbutton7,'Enable','on');    set(handles.pushbutton11,'Enable','on');    pause(.000001)    ofdm    pause(.000001)    set(handles.text10,'String','100');    set(handles.pushbutton7,'Enable','off');    set(handles.pushbutton11,'Enable','off');    set(handles.pushbutton2,'Enable','on');    set(handles.pushbutton2,'BackgroundColor',[0 .75 0]);    set(handles.pushbutton6,'Enable','on');    end    % --------------------------------------------------------------------function varargout = edit1_Callback(h, eventdata, handles, varargin)% Stub for Callback of the uicontrol handles.edit1.% --------------------------------------------------------------------function varargout = edit3_Callback(h, eventdata, handles, varargin)% Stub for Callback of the uicontrol handles.edit3.% --------------------------------------------------------------------function varargout = edit12_Callback(h, eventdata, handles, varargin)% Stub for Callback of the uicontrol handles.edit3.% --------------------------------------------------------------------function varargout = radiobutton1_Callback(h, eventdata, handles, varargin)% Stub for Callback of the uicontrol handles.radiobutton1.set(handles.radiobutton2,'Value',0);set(handles.radiobutton3,'Value',0);set(handles.edit5,'Enable','on');set(handles.edit5,'BackgroundColor',[1.0,1.0,1.0]);set(handles.popupmenu5,'Enable','inactive');set(handles.popupmenu5,'BackgroundColor',[0.8313725490196078,0.8156862745098039,0.7843137254901961]);set(handles.popupmenu6,'Enable','inactive');set(handles.popupmenu6,'BackgroundColor',[0.8313725490196078,0.8156862745098039,0.7843137254901961]);set(handles.edit20,'Enable','inactive');set(handles.edit20,'BackgroundColor',[0.8313725490196078,0.8156862745098039,0.7843137254901961]);% clear axesaxes(handles.axes8)axis offcla% set textset(handles.text14,'Visible','on');set(handles.text15,'Visible','on');set(handles.text17,'Visible','off');set(handles.pushbutton4,'Visible','off');% --------------------------------------------------------------------function varargout = radiobutton2_Callback(h, eventdata, handles, varargin)% Stub for Callback of the uicontrol handles.radiobutton2.s = make_cell('.bmp');set(handles.popupmenu6,'String',s);set(handles.radiobutton1,'Value',0);set(handles.radiobutton3,'Value',0);axes(handles.axes8)s = get(handles.popupmenu6,'String');i = get(handles.popupmenu6,'Value');x = imread(char(s(i)));colormap(gray)imagesc(x)axis offset(handles.popupmenu6,'Enable','on');set(handles.popupmenu6,'BackgroundColor',[1.0,1.0,1.0]);set(handles.edit5,'Enable','inactive');set(handles.edit5,'BackgroundColor',[0.8313725490196078,0.8156862745098039,0.7843137254901961]);set(handles.popupmenu5,'Enable','inactive');set(handles.popupmenu5,'BackgroundColor',[0.8313725490196078,0.8156862745098039,0.7843137254901961]);set(handles.edit20,'Enable','on');set(handles.edit20,'BackgroundColor',[1.0,1.0,1.0]);set(handles.text14,'Visible','off');set(handles.text15,'Visible','off');set(handles.text17,'Visible','on');set(handles.pushbutton4,'Visible','off');set(handles.text17,'String','Transmitted Image');% --------------------------------------------------------------------function varargout = radiobutton3_Callback(h, eventdata, handles, varargin)% Stub for Callback of the uicontrol handles.radiobutton3.s = make_cell('.wav');set(handles.popupmenu5,'String',s);set(handles.radiobutton1,'Value',0);set(handles.radiobutton2,'Value',0);set(handles.popupmenu5,'Enable','on');set(handles.popupmenu5,'BackgroundColor',[1.0,1.0,1.0]);set(handles.edit5,'Enable','inactive');set(handles.edit5,'BackgroundColor',[0.8313725490196078,0.8156862745098039,0.7843137254901961]);set(handles.popupmenu6,'Enable','inactive');set(handles.popupmenu6,'BackgroundColor',[0.8313725490196078,0.8156862745098039,0.7843137254901961]);set(handles.edit20,'Enable','on');set(handles.edit20,'BackgroundColor',[1.0,1.0,1.0]);axes(handles.axes8)s = get(handles.popupmenu5,'String');i = get(handles.popupmenu5,'Value');x = wavread(char(s(i)));plot(x);set(handles.text14,'Visible','off');set(handles.text15,'Visible','off');set(handles.text17,'Visible','on');set(handles.pushbutton4,'Visible','on');set(handles.text17,'String','Transmitted Sound');% --------------------------------------------------------------------function varargout = edit5_Callback(h, eventdata, handles, varargin)% Stub for Callback of the uicontrol handles.edit5.TEXT = get(h,'String');set(handles.text15,'String',TEXT);% --------------------------------------------------------------------function varargout = edit5_ButtondownFcn(h, eventdata, handles, varargin)% Stub for ButtondownFcn of the uicontrol handles.edit5.TEXT = get(h,'String');set(handles.text15,'String',TEXT);% --------------------------------------------------------------------function varargout = edit1_ButtondownFcn(h, eventdata, handles, varargin)% Stub for ButtondownFcn of the uicontrol handles.edit1.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -