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

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

[复制链接]

该用户从未签到

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

EDA365欢迎您登录!

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

x
% l" z5 n2 @! J& ?7 G$ o2 S
一、简介: g/ E& J0 \1 G% J2 l. `
基于matlab GUI银行贷款计算系统
: P2 h0 a. t: {8 C) j+ ^/ ]
( @; c" @1 ?" F6 }6 z* O2 r3 {( i; r- b
二、源代码
- w6 X' {3 u! s( C' I/ l; N2 x
# t9 t: r1 _% R
  • 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)

  • 8 _& E- E- H0 S. |% z6 t. i

0 J# a4 @0 e  c& q; E" {+ A' ?% O2 e! q0 j3 l0 X

0 s! D8 Q$ |) U) E' D3 m: _
- s# ]4 t( k, b# B4 J# F三、运行结果
# L2 X; V# d3 i& X8 B- q4 G, b
, F6 P- w; Y- b6 n+ w+ x1 n$ D3 X
: o2 l; f  h& {0 n0 ^0 I1 T& c3 O$ r
: B/ V7 d; {/ z5 K

, x6 n% B+ W; q$ c) ~
  • 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-7-18 19:34 , Processed in 0.125000 second(s), 26 queries , Gzip On.

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

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

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