经管之家送您一份
应届毕业生专属福利!
求职就业群
感谢您参与论坛问题回答
经管之家送您两个论坛币!
+2 论坛币
想做一个MATLAB界面,界面里包括是个独立的版块,第一次接触,还望大神给与帮助,要求有两个,一是根据每一个版块左上角的按钮(起名“提取数据”)来达到点击按钮提取该模块数据导入到一个excel的目的,二是要求点击每一列的变量名可以达到排序的目的;目前代码如下: - function varargout = untitled0328(varargin)
- % UNTITLED0328 MATLAB code for untitled0328.fig
- % UNTITLED0328, by itself, creates a new UNTITLED0328 or raises the existing
- % singleton*.
- %
- % H = UNTITLED0328 returns the handle to a new UNTITLED0328 or the handle to
- % the existing singleton*.
- %
- % UNTITLED0328('CALLBACK',hObject,eventData,handles,...) calls the local
- % function named CALLBACK in UNTITLED0328.M with the given input arguments.
- %
- % UNTITLED0328('Property','Value',...) creates a new UNTITLED0328 or raises the
- % existing singleton*. Starting from the left, property value pairs are
- % applied to the GUI before untitled0328_OpeningFcn gets called. An
- % unrecognized property name or invalid value makes property application
- % stop. All inputs are passed to untitled0328_OpeningFcn via varargin.
- %
- % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
- % instance to run (singleton)".
- %
- % See also: GUIDE, GUIDATA, GUIHANDLES
- % Edit the above text to modify the response to help untitled0328
- % Last Modified by GUIDE v2.5 28-Mar-2017 21:45:37
- % Begin initialization code - DO NOT EDIT
- gui_Singleton = 1;
- gui_State = struct('gui_Name', mfilename, ...
- 'gui_Singleton', gui_Singleton, ...
- 'gui_OpeningFcn', @untitled0328_OpeningFcn, ...
- 'gui_OutputFcn', @untitled0328_OutputFcn, ...
- 'gui_LayoutFcn', [] , ...
- 'gui_Callback', []);
- if nargin && ischar(varargin{1})
- gui_State.gui_Callback = str2func(varargin{1});
- end
- if nargout
- [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
- else
- gui_mainfcn(gui_State, varargin{:});
- end
- % End initialization code - DO NOT EDIT
- % --- Executes just before untitled0328 is made visible.
- function untitled0328_OpeningFcn(hObject, eventdata, handles, varargin)
- % This function has no output args, see OutputFcn.
- % hObject handle to figure
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % varargin command line arguments to untitled0328 (see VARARGIN)
- % Choose default command line output for untitled0328
- handles.output = hObject;
- % Update handles structure
- guidata(hObject, handles);
- % UIWAIT makes untitled0328 wait for user response (see UIRESUME)
- % uiwait(handles.figure1);
- guidata(hObject, handles);
- %左边最上面
- X=xlsread('C:\Users\Administrator\Documents\Tencent Files\1099491745\FileRecv\灰色关联数据-20170320.xlsx','A4:M14');
- columenname={'年份','RY(千人)','RZ(亿元)','NI(亿元)','NP(亿元)','ZL(个数)','IP(亿元)','OPI(亿元)','FGI(亿元)','CZC(亿元)','CHZ()','BTL CGC(亿元'};
- handle(uitable('data',X,'Position',[0,300,700,300],'ColumnName',columenname));
- %左边最小面
- X=xlsread('C:\Users\Administrator\Documents\Tencent Files\1099491745\FileRecv\灰色关联数据-20170320.xlsx','A4:M14');
- columenname={'年份','RY(千人)','RZ(亿元)','NI(亿元)','NP(亿元)','ZL(个数)','IP(亿元)','OPI(亿元)','FGI(亿元)','CZC(亿元)','CHZ()','BTL CGC(亿元'};
- handle(uitable('data',X,'Position',[0,0,700,300],'ColumnName',columenname));
- %右边最上面
- X=xlsread('C:\Users\Administrator\Documents\Tencent Files\1099491745\FileRecv\灰色关联数据-20170320.xlsx','A4:M14');
- columenname={'年份','RY(千人)','RZ(亿元)','NI(亿元)','NP(亿元)','ZL(个数)','IP(亿元)','OPI(亿元)','FGI(亿元)','CZC(亿元)','CHZ()','BTL CGC(亿元'};
- handle(uitable('data',X,'Position',[600,300,700,300],'ColumnName',columenname));
- %右边最小面
- X=xlsread('C:\Users\Administrator\Documents\Tencent Files\1099491745\FileRecv\灰色关联数据-20170320.xlsx','A4:M14');
- columenname={'年份','RY(千人)','RZ(亿元)','NI(亿元)','NP(亿元)','ZL(个数)','IP(亿元)','OPI(亿元)','FGI(亿元)','CZC(亿元)','CHZ()','BTL CGC(亿元'};
- handle(uitable('data',X,'Position',[600,0,700,300],'ColumnName',columenname));
- % --- Outputs from this function are returned to the command line.
- function varargout = untitled0328_OutputFcn(hObject, eventdata, handles)
- % varargout cell array for returning output args (see VARARGOUT);
- % hObject handle to figure
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % Get default command line output from handles structure
- varargout{1} = handles.output;
- % --- Executes on button press in pushbutton1.
- function pushbutton1_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton1 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on button press in pushbutton2.
- function pushbutton2_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton2 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on button press in pushbutton3.
- function pushbutton3_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton3 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on button press in pushbutton4.
- function pushbutton4_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton4 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
复制代码
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
|