找回密码
 注册
关于网站域名变更的通知
查看: 290|回复: 3
打印 上一主题 下一主题

基于matlab GUI银行贷款计算系统

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2021-9-22 14:10 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

EDA365欢迎您登录!

您需要 登录 才可以下载或查看,没有帐号?注册

x
( p7 X/ f( A4 a8 V) J; d  p
一、简介2 e$ b0 V/ m3 g, }0 i0 v& Q
基于matlab GUI银行贷款计算系统! |% J7 Z- a# e+ n0 ]( q# ]
. s; Q  Y) e2 V% a

0 m9 r8 O1 J1 l$ q) N1 u二、源代码
$ n" f) a" s6 x0 u; Q5 w+ d/ d- Z: F5 @! `5 ~
  • function varargout = untitled4(varargin)
  • % UNTITLED4 M-file for untitled4.fig
  • %      UNTITLED4, by itself, creates a new UNTITLED4 or raises the existing
  • %      singleton*.
  • %
  • %      H = UNTITLED4 returns the handle to a new UNTITLED4 or the handle to
  • %      the existing singleton*.
  • %
  • %      UNTITLED4('CALLBACK',hObject,eventData,handles,...) calls the local
  • %      function named CALLBACK in UNTITLED4.M with the given input arguments.
  • %
  • %      UNTITLED4('Property','Value',...) creates a new UNTITLED4 or raises the
  • %      existing singleton*.  Starting from the left, property value pairs are
  • %      applied to the GUI before untitled4_OpeningFunction gets called.  An
  • %      unrecognized property name or invalid value makes property application
  • %      stop.  All inputs are passed to untitled4_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 untitled4
  • % Last Modified by GUIDE v2.5 25-Jun-2021 08:16:21
  • % Begin initialization code - DO NOT EDIT
  • gui_Singleton = 1;
  • gui_State = struct('gui_Name',       mfilename, ...
  •                    'gui_Singleton',  gui_Singleton, ...
  •                    'gui_OpeningFcn', @untitled4_OpeningFcn, ...
  •                    'gui_OutputFcn',  @untitled4_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 untitled4 is made visible.
  • function untitled4_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 untitled4 (see VARARGIN)
  • % Choose default command line output for untitled4
  • handles.output = hObject;
  • % Update handles structure
  • guidata(hObject, handles);
  • % UIWAIT makes untitled4 wait for user response (see UIRESUME)
  • % uiwait(handles.figure1);
  • % --- Outputs from this function are returned to the command line.
  • function varargout = untitled4_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 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 listbox1
  • % --- 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');
  • end
  • % --- Executes on selection change in listbox2.
  • function listbox2_Callback(hObject, eventdata, handles)
  • % hObject    handle to listbox2 (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 listbox2 contents as cell array
  • %        contents{get(hObject,'Value')} returns selected item from listbox2
  • % --- Executes during object creation, after setting all properties.
  • function listbox2_CreateFcn(hObject, eventdata, handles)
  • % hObject    handle to listbox2 (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');
  • end
  • % --- Executes on selection change in listbox3.
  • function listbox3_Callback(hObject, eventdata, handles)
  • % hObject    handle to listbox3 (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 listbox3 contents as cell array
  • %        contents{get(hObject,'Value')} returns selected item from listbox3
  • % --- Executes during object creation, after setting all properties.
  • function listbox3_CreateFcn(hObject, eventdata, handles)
  • % hObject    handle to listbox3 (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');
  • end
  • % --- Executes on button press in radiobutton1.
  • function radiobutton1_Callback(hObject, eventdata, handles)
  • % hObject    handle to radiobutton1 (see GCBO)
  • % eventdata  reserved - to be defined in a future version of MATLAB
  • % handles    structure with handles and user data (see GUIDATA)
  • % Hint: get(hObject,'Value') returns toggle state of radiobutton1
  • function d_edit1_Callback(hObject, eventdata, handles)
  • % hObject    handle to d_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 d_edit1 as text
  • %        str2double(get(hObject,'String')) returns contents of d_edit1 as a double
  • % --- Executes during object creation, after setting all properties.
  • function d_edit1_CreateFcn(hObject, eventdata, handles)
  • % hObject    handle to d_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
  • function edit2_Callback(hObject, eventdata, handles)
  • set(handles.edit2,'string');
  • % hObject    handle to edit2 (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 edit2 as text
  • %        str2double(get(hObject,'String')) returns contents of edit2 as a double
  • % --- Executes during object creation, after setting all properties.
  • function edit2_CreateFcn(hObject, eventdata, handles)
  • % hObject    handle to edit2 (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
  • % --- Executes on button press in pushbutton1.
  • function pushbutton1_Callback(hObject, eventdata, handles)
  • x1=str2num(get(handles.d_edit1,'string'));
  • x2=str2num(get(handles.edit2,'string'));
  • x3=get(handles.listbox2,'value');
  • x3=x3*12;
  • x4=get(handles.listbox3,'value');
  • x4=x4/12;
  • x5=[x1*x4*(1+x4)^x3]/[(1+x4)^x3-1];
  • x6=x5*x3;
  • x7=x6-x1;
  • set(handles.text13,'string',num2str(x6));
  • set(handles.text14,'string',num2str(x2));
  • set(handles.text15,'string',num2str(x5));
  • set(handles.text16,'string',num2str(x1));
  • set(handles.text17,'string',num2str(x7));
  • set(handles.text18,'string',num2str(x3));
  • % 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)
  • set(handles.d_edit1,'string','');
  • set(handles.edit2,'string','');
  • set(handles.text13,'string','');
  • set(handles.text14,'string','');
  • set(handles.text15,'string','');
  • set(handles.text16,'string','');
  • set(handles.text17,'string','');
  • set(handles.text18,'string','');
  • % 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)
  • ; ^. R! |: h. z% {. A
1 w: u, a2 F4 g3 l; ~5 h! `( L9 c2 I

% z  z1 Q1 B+ f3 T) d! v. Y8 E
" h9 Z2 y" t, o; t- M+ |6 @1 V& z7 T) b2 q
三、运行结果
" Y% y9 ?% Y; h" y% l4 Q. w0 K$ C$ |0 I2 b
) ^2 k& q  W6 s- w1 Y# `1 {) H
) Q; y3 j4 k4 Y6 E

4 f$ J+ I7 ~; W2 d8 L6 @: Z. ]) _: x9 l( B; {
  • TA的每日心情
    慵懒
    2020-6-13 15:46
  • 签到天数: 1 天

    [LV.1]初来乍到

    2#
    发表于 2021-9-22 15:30 | 只看该作者
    基于matlab GUI银行贷款计算系统

    该用户从未签到

    3#
    发表于 2021-9-22 15:31 | 只看该作者
    基于matlab GUI银行贷款计算系统

    该用户从未签到

    4#
    发表于 2021-9-22 15:32 | 只看该作者
    基于matlab GUI银行贷款计算系统
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则

    关闭

    推荐内容上一条 /1 下一条

    EDA365公众号

    关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )

    GMT+8, 2025-6-19 17:28 , Processed in 0.093750 second(s), 26 queries , Gzip On.

    深圳市墨知创新科技有限公司

    地址:深圳市南山区科技生态园2栋A座805 电话:19926409050

    快速回复 返回顶部 返回列表