📄 cj_qury.asv
字号:
function varargout = cj_qury(varargin)% CJ_QURY M-file for cj_qury.fig% CJ_QURY, by itself, creates a new CJ_QURY or raises the existing% singleton*.%% H = CJ_QURY returns the handle to a new CJ_QURY or the handle to% the existing singleton*.%% CJ_QURY('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in CJ_QURY.M with the given input arguments.%% CJ_QURY('Property','Value',...) creates a new CJ_QURY or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before cj_qury_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to cj_qury_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 cj_qury% Last Modified by GUIDE v2.5 05-May-2009 15:14:43% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @cj_qury_OpeningFcn, ... 'gui_OutputFcn', @cj_qury_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []);if nargin && ischar(varargin{1}) gui_State.gui_Callback = str2func(varargin{1});endif 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 cj_qury is made visible.function cj_qury_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 cj_qury (see VARARGIN)% Choose default command line output for cj_quryhandles.output = hObject;fin=fopen('cj.txt','r');str=fgetl(fin);[s1 s2 s3 s4]=strread(str,'%s %s %s %s','delimiter',' ');xm(1)=s1;count=2;while feof(fin)==0 str=fgetl(fin); [name D E F]=strread(str,'%s %d %d %d','delimiter',' '); xm(count)=name; cj(count-1,:)=[D E F]; count=count+1;end;set(handles.listbox1,'string',xm);handles.cj=cj;fclose(fin);% Update handles structureguidata(hObject, handles);% UIWAIT makes cj_qury wait for user response (see UIRESUME)% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.function varargout = cj_qury_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 structurevarargout{1} = handles.output;% --- Executes on selection change in listbox1.function listbox1_Callback(hObject, eventdata, handles)% hObject handle to listbox1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: contents = get(hObject,'String') returns listbox1 contents as cell array% contents{get(hObject,'Value')} returns selected item from listbox1value=get(hObject,'value')-1;% --- Executes during object creation, after setting all properties.function listbox1_CreateFcn(hObject, eventdata, handles)% hObject handle to listbox1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: listbox controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');endfunction edit1_Callback(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit1 as text% str2double(get(hObject,'String')) returns contents of edit1 as a double% --- Executes during object creation, after setting all properties.function edit1_CreateFcn(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white');end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -