ΠŸΠΎΠΌΠΎΡ‰ΡŒ Π² написании студСнчСских Ρ€Π°Π±ΠΎΡ‚
АнтистрСссовый сСрвис

КомплСкс ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ экономичСских Π·Π°Π΄Π°Ρ‡

Дипломная ΠšΡƒΠΏΠΈΡ‚ΡŒ Π³ΠΎΡ‚ΠΎΠ²ΡƒΡŽ Π£Π·Π½Π°Ρ‚ΡŒ ΡΡ‚ΠΎΠΈΠΌΠΎΡΡ‚ΡŒΠΌΠΎΠ΅ΠΉ Ρ€Π°Π±ΠΎΡ‚Ρ‹

MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW, by itself, creates a new MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW or raises the existing. H = MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW returns the handle to a new MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW or the handle to. BONDYIELDATMATURITYATTHEENDOFWINDOW ('Property','Value',…) creates a new BONDYIELDATMATURITYATTHEENDOFWINDOW or raises the… Π§ΠΈΡ‚Π°Ρ‚ΡŒ Π΅Ρ‰Ρ‘ >

КомплСкс ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌ Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ экономичСских Π·Π°Π΄Π°Ρ‡ (Ρ€Π΅Ρ„Π΅Ρ€Π°Ρ‚, курсовая, Π΄ΠΈΠΏΠ»ΠΎΠΌ, ΠΊΠΎΠ½Ρ‚Ρ€ΠΎΠ»ΡŒΠ½Π°Ρ)

Π‘ΠΎΠ΄Π΅Ρ€ΠΆΠ°Π½ΠΈΠ΅

  • ОписаниС Ρ€Π°Π±ΠΎΡ‚Ρ‹ с ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠΎΠΉ Запуск ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹
  • Π“Π»Π°Π²Π½ΠΎΠ΅ ΠΎΠΊΠ½ΠΎ ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹
  • ΠŸΡƒΠ½ΠΊΡ‚ мСню «ΠœΠΈΠΊΡ€ΠΎΡΠΊΠΎΠ½ΠΎΠΌΠΈΠΊΠ°»
  • ΠŸΠΎΡ‚Ρ€Π΅Π±Π»Π΅Π½ΠΈΠ΅
  • ΠšΡ€ΠΈΠ²Ρ‹Ρ… бСзразличия
  • ΠŸΡ€Π΅Π΄Π΅Π»ΡŒΠ½Π°Ρ ΠΏΠΎΠ»Π΅Π·Π½ΠΎΡΡ‚ΡŒ
  • ВСория потрСблСния
  • ΠŸΡ€ΠΎΠΈΠ·Π²ΠΎΠ΄ΡΡ‚Π²ΠΎ
  • ΠŸΡ€Π΅Π΄Π΅Π»ΡŒΠ½Π°Ρ ΠΏΡ€ΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎΡΡ‚ΡŒ
  • ВСория производства
  • Π Ρ‹Π½ΠΎΠΊ
  • ΠŸΠ°ΡƒΡ‚ΠΈΠ½ΠΎΠΎΠ±Ρ€Π°Π·Π½Π°Ρ модСль
  • МодСль ΠΎΠ±Ρ‰Π΅Π³ΠΎ равновСсия
  • ДвухсСкторная модСль
  • Π€ΠΈΡ€ΠΌΠ°
  • МодСль ΠΊΠΎΠ½ΠΊΡƒΡ€Π΅Π½Ρ‚Π½ΠΎΠΉ отрасли
  • МодСль Π΄ΡƒΠΎΠΏΠΎΠ»ΠΈΠΈ
  • ΠŸΡƒΠ½ΠΊΡ‚ мСню «ΠœΠ°ΠΊΡ€ΠΎΡΠΊΠΎΠ½ΠΎΠΌΠΈΠΊΠ°»
  • ΠžΡΠ½ΠΎΠ²Ρ‹ макроэкономичСской Ρ‚Π΅ΠΎΡ€ΠΈΠΈ
  • ΠžΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½ΠΈΠ΅ Π½Π°Ρ†ΠΈΠΎΠ½Π°Π»ΡŒΠ½ΠΎΠ³ΠΎ Π΄ΠΎΡ…ΠΎΠ΄Π°
  • ΠœΠ°ΠΊΡ€ΠΎΠΌΠΎΠ΄Π΅Π»ΡŒ роста
  • МодСль Π΄Π΅Π»ΠΎΠ²ΠΎΠ³ΠΎ Ρ†ΠΈΠΊΠ»Π°
  • Π£ΠΏΡ€Π°Π²Π»Π΅Π½ΠΈΠ΅ Π² ΡΠΊΠΎΠ½ΠΎΠΌΠΈΠΊΠ΅
  • ΠžΠ±ΠΎΠ±Ρ‰Π΅Π½Π½Π°Ρ модСль Π›Π΅ΠΎΠ½Ρ‚ΡŒΠ΅Π²Π°
  • МодСль ΠšΠ°Π½Ρ‚ΠΎΡ€ΠΎΠ²ΠΈΡ‡Π°
  • МодСль Ρ„ΠΎΠ½ НСймана
  • МодСль Π§Ρƒ-НСйлора
  • ΠŸΡƒΠ½ΠΊΡ‚ мСню «ΠžΠ±Ρ‰Π°Ρ экономика»
  • МодСль насыщСния Ρ€Ρ‹Π½ΠΊΠ° Π°Π²Ρ‚ΠΎΠΌΠΎΠ±ΠΈΠ»Π΅ΠΉ
  • МодСль финансовой ΠΏΠΈΡ€Π°ΠΌΠΈΠ΄Ρ‹
  • МодСль составлСния Ρ€ΡƒΠ΄Π½ΠΎΠΉ смСси
  • МодСль Π²Ρ‹Π±ΠΎΡ€Π° срСдств массовой ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΠΈ
  • МодСль Π΄ΠΎΡ…ΠΎΠ΄Π½ΠΎΡΡ‚ΡŒ ΠΎΠ±Π»ΠΈΠ³Π°Ρ†ΠΈΠΈ
  • МодСль доходности банковских ΠΎΠΏΠ΅Ρ€Π°Ρ†ΠΈΠΉ
  • МодСль взаиморасчСтов

function popupmenu1_CreateFcn (hObject, eventdata, handles)

% hObject handle to popupmenu1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles empty — handles not created until after all CreateFcns called

% Hint: popupmenu 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 b0_Callback (hObject, eventdata, handles)

global b0;

% hObject handle to b0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

b0=str2double (get (hObject,'String'));

if isnan (b0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of b0 as text

% str2double (get (hObject,'String')) returns contents of b0 as a double

% —- Executes during object creation, after setting all properties.

function b0_CreateFcn (hObject, eventdata, handles)

% hObject handle to b0 (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 yp0_Callback (hObject, eventdata, handles)

global yp0;

% hObject handle to yp0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

yp0=str2double (get (hObject,'String'));

if isnan (yp0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of yp0 as text

% str2double (get (hObject,'String')) returns contents of yp0 as a double

% —- Executes during object creation, after setting all properties.

function yp0_CreateFcn (hObject, eventdata, handles)

% hObject handle to yp0 (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 d0_Callback (hObject, eventdata, handles)

global d0;

% hObject handle to d0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

d0=str2double (get (hObject,'String'));

if isnan (d0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of d0 as text

% str2double (get (hObject,'String')) returns contents of d0 as a double

% —- Executes during object creation, after setting all properties.

function d0_CreateFcn (hObject, eventdata, handles)

% hObject handle to d0 (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 p0_Callback (hObject, eventdata, handles)

global p0;

% hObject handle to p0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

p0=str2double (get (hObject,'String'));

if isnan (p0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of p0 as text

% str2double (get (hObject,'String')) returns contents of p0 as a double

% —- Executes during object creation, after setting all properties.

function p0_CreateFcn (hObject, eventdata, handles)

% hObject handle to p0 (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 T_Callback (hObject, eventdata, handles)

global T;

% hObject handle to T (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

T=str2double (get (hObject,'String'));

if isnan (T)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of T as text

% str2double (get (hObject,'String')) returns contents of T as a double

function k0_Callback (hObject, eventdata, handles)

global k0;

% hObject handle to k0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

k0=str2double (get (hObject,'String'));

if isnan (k0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of k0 as text

% str2double (get (hObject,'String')) returns contents of k0 as a double

% —- Executes during object creation, after setting all properties.

function k0_CreateFcn (hObject, eventdata, handles)

% hObject handle to k0 (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 Profit0_Callback (hObject, eventdata, handles)

global Profit0;

% hObject handle to Profit0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

Profit0=str2double (get (hObject,'String'));

if isnan (Profit0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of Profit0 as text

% str2double (get (hObject,'String')) returns contents of Profit0 as a double

% —- Executes during object creation, after setting all properties.

function Profit0_CreateFcn (hObject, eventdata, handles)

% hObject handle to Profit0 (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 Income0_Callback (hObject, eventdata, handles)

global Income0;

% hObject handle to Income0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

Income0=str2double (get (hObject,'String'));

if isnan (Income0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of Income0 as text

% str2double (get (hObject,'String')) returns contents of Income0 as a double

% —- Executes during object creation, after setting all properties.

function Income0_CreateFcn (hObject, eventdata, handles)

% hObject handle to Income0 (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 Tempt0_Callback (hObject, eventdata, handles)

global Tempt0;

% hObject handle to Tempt0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

Tempt0=str2double (get (hObject,'String'));

if isnan (Tempt0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of Tempt0 as text

% str2double (get (hObject,'String')) returns contents of Tempt0 as a double

% —- Executes during object creation, after setting all properties.

function Tempt0_CreateFcn (hObject, eventdata, handles)

% hObject handle to Tempt0 (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 during object creation, after setting all properties.

function uitable1_CreateFcn (hObject, eventdata, handles)

% hObject handle to uitable1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles empty — handles not created until after all CreateFcns called

% —- Executes during object creation, after setting all properties.

function pushbutton1_CreateFcn (hObject, eventdata, handles)

% hObject handle to pushbutton1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles empty — handles not created until after all CreateFcns called

% —- Executes during object creation, after setting all properties.

function pushbutton2_CreateFcn (hObject, eventdata, handles)

% hObject handle to pushbutton2 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles empty — handles not created until after all CreateFcns called

% —- Executes during object creation, after setting all properties.

function T_CreateFcn (hObject, eventdata, handles)

% hObject handle to T (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 varargout = ModelDrawingOreMixtureWindow (varargin)

% MODELDRAWINGOREMIXTUREWINDOW MATLAB code for ModelDrawingOreMixtureWindow. fig

% MODELDRAWINGOREMIXTUREWINDOW, by itself, creates a new MODELDRAWINGOREMIXTUREWINDOW or raises the existing

% singleton*.

%

% H = MODELDRAWINGOREMIXTUREWINDOW returns the handle to a new MODELDRAWINGOREMIXTUREWINDOW or the handle to

% the existing singleton*.

%

% MODELDRAWINGOREMIXTUREWINDOW ('CALLBACK', hObject, eventData, handles,…) calls the local

% function named CALLBACK in MODELDRAWINGOREMIXTUREWINDOW. M with the given input arguments.

%

% MODELDRAWINGOREMIXTUREWINDOW ('Property','Value',…) creates a new MODELDRAWINGOREMIXTUREWINDOW or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before ModelDrawingOreMixtureWindow_OpeningFcn gets called. An

% unrecognized property name or invalid value makes property application

% stop. All inputs are passed to ModelDrawingOreMixtureWindow_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 ModelDrawingOreMixtureWindow

% Last Modified by GUIDE v2.5 20-Apr-2015 19:18:57

% Begin initialization code — DO NOT EDIT

gui_Singleton = 1;

gui_State = struct ('gui_Name', mfilename, …

'gui_Singleton', gui_Singleton, …

'gui_OpeningFcn', @ModelDrawingOreMixtureWindow_OpeningFcn, …

'gui_OutputFcn', @ModelDrawingOreMixtureWindow_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 ModelDrawingOreMixtureWindow is made visible.

function ModelDrawingOreMixtureWindow_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 ModelDrawingOreMixtureWindow (see VARARGIN)

% Choose default command line output for ModelDrawingOreMixtureWindow

handles.output = hObject;

% Update handles structure

guidata (hObject, handles);

% UIWAIT makes ModelDrawingOreMixtureWindow wait for user response (see UIRESUME)

% uiwait (handles.ModelDrawingOreMixtureWindow);

% —- Outputs from this function are returned to the command line.

function varargout = ModelDrawingOreMixtureWindow_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;

function A1_Callback (hObject, eventdata, handles)

global A1;

% hObject handle to A1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

A1=str2double (get (hObject,'String'));

if isnan (A1)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of A1 as text

% str2double (get (hObject,'String')) returns contents of A1 as a double

% —- Executes during object creation, after setting all properties.

function A1_CreateFcn (hObject, eventdata, handles)

% hObject handle to A1 (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 B1_Callback (hObject, eventdata, handles)

global B1;

% hObject handle to B1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

B1=str2double (get (hObject,'String'));

if isnan (B1)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of B1 as text

% str2double (get (hObject,'String')) returns contents of B1 as a double

% —- Executes during object creation, after setting all properties.

function B1_CreateFcn (hObject, eventdata, handles)

% hObject handle to B1 (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 C1_Callback (hObject, eventdata, handles)

global C1;

% hObject handle to C1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

C1=str2double (get (hObject,'String'));

if isnan (C1)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of C1 as text

% str2double (get (hObject,'String')) returns contents of C1 as a double

% —- Executes during object creation, after setting all properties.

function C1_CreateFcn (hObject, eventdata, handles)

% hObject handle to C1 (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)

% 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

function edit3_Callback (hObject, eventdata, handles)

% hObject handle to edit3 (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 edit3 as text

% str2double (get (hObject,'String')) returns contents of edit3 as a double

% —- Executes during object creation, after setting all properties.

function edit3_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit3 (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 edit4_Callback (hObject, eventdata, handles)

% hObject handle to edit4 (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 edit4 as text

% str2double (get (hObject,'String')) returns contents of edit4 as a double

% —- Executes during object creation, after setting all properties.

function edit4_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit4 (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 edit5_Callback (hObject, eventdata, handles)

% hObject handle to edit5 (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 edit5 as text

% str2double (get (hObject,'String')) returns contents of edit5 as a double

% —- Executes during object creation, after setting all properties.

function edit5_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit5 (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 edit6_Callback (hObject, eventdata, handles)

% hObject handle to edit6 (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 edit6 as text

% str2double (get (hObject,'String')) returns contents of edit6 as a double

% —- Executes during object creation, after setting all properties.

function edit6_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit6 (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 edit7_Callback (hObject, eventdata, handles)

% hObject handle to edit7 (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 edit7 as text

% str2double (get (hObject,'String')) returns contents of edit7 as a double

% —- Executes during object creation, after setting all properties.

function edit7_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit7 (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 edit8_Callback (hObject, eventdata, handles)

% hObject handle to edit8 (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 edit8 as text

% str2double (get (hObject,'String')) returns contents of edit8 as a double

% —- Executes during object creation, after setting all properties.

function edit8_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit8 (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 edit9_Callback (hObject, eventdata, handles)

% hObject handle to edit9 (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 edit9 as text

% str2double (get (hObject,'String')) returns contents of edit9 as a double

% —- Executes during object creation, after setting all properties.

function edit9_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit9 (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 edit10_Callback (hObject, eventdata, handles)

% hObject handle to edit10 (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 edit10 as text

% str2double (get (hObject,'String')) returns contents of edit10 as a double

% —- Executes during object creation, after setting all properties.

function edit10_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit10 (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 edit11_Callback (hObject, eventdata, handles)

% hObject handle to edit11 (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 edit11 as text

% str2double (get (hObject,'String')) returns contents of edit11 as a double

% —- Executes during object creation, after setting all properties.

function edit11_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit11 (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 edit12_Callback (hObject, eventdata, handles)

% hObject handle to edit12 (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 edit12 as text

% str2double (get (hObject,'String')) returns contents of edit12 as a double

% —- Executes during object creation, after setting all properties.

function edit12_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit12 (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 edit13_Callback (hObject, eventdata, handles)

% hObject handle to edit13 (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 edit13 as text

% str2double (get (hObject,'String')) returns contents of edit13 as a double

% —- Executes during object creation, after setting all properties.

function edit13_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit13 (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 edit14_Callback (hObject, eventdata, handles)

% hObject handle to edit14 (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 edit14 as text

% str2double (get (hObject,'String')) returns contents of edit14 as a double

% —- Executes during object creation, after setting all properties.

function edit14_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit14 (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 edit15_Callback (hObject, eventdata, handles)

% hObject handle to edit15 (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 edit15 as text

% str2double (get (hObject,'String')) returns contents of edit15 as a double

% —- Executes during object creation, after setting all properties.

function edit15_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit15 (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 edit16_Callback (hObject, eventdata, handles)

% hObject handle to edit16 (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 edit16 as text

% str2double (get (hObject,'String')) returns contents of edit16 as a double

% —- Executes during object creation, after setting all properties.

function edit16_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit16 (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 A2_Callback (hObject, eventdata, handles)

global A2;

% hObject handle to A2 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

A2=str2double (get (hObject,'String'));

if isnan (A2)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of A2 as text

% str2double (get (hObject,'String')) returns contents of A2 as a double

% —- Executes during object creation, after setting all properties.

function A2_CreateFcn (hObject, eventdata, handles)

% hObject handle to A2 (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 B2_Callback (hObject, eventdata, handles)

global B2;

% hObject handle to B2 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

B2=str2double (get (hObject,'String'));

if isnan (B2)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of B2 as text

% str2double (get (hObject,'String')) returns contents of B2 as a double

% —- Executes during object creation, after setting all properties.

function B2_CreateFcn (hObject, eventdata, handles)

% hObject handle to B2 (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 edit21_Callback (hObject, eventdata, handles)

% hObject handle to B2 (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 B2 as text

% str2double (get (hObject,'String')) returns contents of B2 as a double

% —- Executes during object creation, after setting all properties.

function edit21_CreateFcn (hObject, eventdata, handles)

% hObject handle to B2 (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 C2_Callback (hObject, eventdata, handles)

global C2;

% hObject handle to C2 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

C2=str2double (get (hObject,'String'));

if isnan (C2)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of C2 as text

% str2double (get (hObject,'String')) returns contents of C2 as a double

function A3_Callback (hObject, eventdata, handles)

global A3;

% hObject handle to A3 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

A3=str2double (get (hObject,'String'));

if isnan (A3)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of A3 as text

% str2double (get (hObject,'String')) returns contents of A3 as a double

% —- Executes during object creation, after setting all properties.

function A3_CreateFcn (hObject, eventdata, handles)

% hObject handle to A3 (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 B3_Callback (hObject, eventdata, handles)

global B3;

% hObject handle to B3 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

B3=str2double (get (hObject,'String'));

if isnan (B3)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of B3 as text

% str2double (get (hObject,'String')) returns contents of B3 as a double

% —- Executes during object creation, after setting all properties.

function B3_CreateFcn (hObject, eventdata, handles)

% hObject handle to B3 (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 C3_Callback (hObject, eventdata, handles)

global C3;

% hObject handle to C3 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

C3=str2double (get (hObject,'String'));

if isnan (C3)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of C3 as text

% str2double (get (hObject,'String')) returns contents of C3 as a double

% —- Executes during object creation, after setting all properties.

function C3_CreateFcn (hObject, eventdata, handles)

% hObject handle to C3 (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 A4_Callback (hObject, eventdata, handles)

global A4;

% hObject handle to A4 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

A4=str2double (get (hObject,'String'));

if isnan (A4)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of A4 as text

% str2double (get (hObject,'String')) returns contents of A4 as a double

% —- Executes during object creation, after setting all properties.

function A4_CreateFcn (hObject, eventdata, handles)

% hObject handle to A4 (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 B4_Callback (hObject, eventdata, handles)

global B4;

% hObject handle to B4 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

B4=str2double (get (hObject,'String'));

if isnan (B4)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of B4 as text

% str2double (get (hObject,'String')) returns contents of B4 as a double

% —- Executes during object creation, after setting all properties.

function B4_CreateFcn (hObject, eventdata, handles)

% hObject handle to B4 (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 C4_Callback (hObject, eventdata, handles)

global C4;

% hObject handle to C4 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

C4=str2double (get (hObject,'String'));

if isnan (C4)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of C4 as text

% str2double (get (hObject,'String')) returns contents of C4 as a double

% —- Executes during object creation, after setting all properties.

function C4_CreateFcn (hObject, eventdata, handles)

% hObject handle to C4 (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 A5_Callback (hObject, eventdata, handles)

global A5;

% hObject handle to A5 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

A5=str2double (get (hObject,'String'));

if isnan (A5)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of A5 as text

% str2double (get (hObject,'String')) returns contents of A5 as a double

% —- Executes during object creation, after setting all properties.

function A5_CreateFcn (hObject, eventdata, handles)

% hObject handle to A5 (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 B5_Callback (hObject, eventdata, handles)

global B5;

% hObject handle to B5 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

B5=str2double (get (hObject,'String'));

if isnan (B5)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of B5 as text

% str2double (get (hObject,'String')) returns contents of B5 as a double

% —- Executes during object creation, after setting all properties.

function B5_CreateFcn (hObject, eventdata, handles)

% hObject handle to B5 (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 C5_Callback (hObject, eventdata, handles)

global C5;

% hObject handle to C5 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

C5=str2double (get (hObject,'String'));

if isnan (C5)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of C5 as text

% str2double (get (hObject,'String')) returns contents of C5 as a double

% —- Executes during object creation, after setting all properties.

function C5_CreateFcn (hObject, eventdata, handles)

% hObject handle to C5 (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)

global A1;

global B1;

global C1;

%========

global A2

global B2;

global C2;

%========

global A3;

global B3;

global C3;

%========

global A4;

global B4;

global C4;

%========

global A5;

global B5;

global C5;

%========

global S1;

global S2;

global S3;

global S4;

%========

% 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)

A1=str2double (get (handles.A1,'string'));

B1=str2double (get (handles.B1,'string'));

C1=str2double (get (handles.C1,'string'));

%===========================

A2=str2double (get (handles.A2,'string'));

B2=str2double (get (handles.B2,'string'));

C2=str2double (get (handles.C2,'string'));

%===========================

A3=str2double (get (handles.A3,'string'));

B3=str2double (get (handles.B3,'string'));

C3=str2double (get (handles.C3,'string'));

%===========================

A4=str2double (get (handles.A4,'string'));

B4=str2double (get (handles.B4,'string'));

C4=str2double (get (handles.C4,'string'));

%===========================

A5=str2double (get (handles.A5,'string'));

B5=str2double (get (handles.B5,'string'));

C5=str2double (get (handles.C5,'string'));

%===========================

S1=str2double (get (handles.S1,'string'));

S2=str2double (get (handles.S2,'string'));

S3=str2double (get (handles.S3,'string'));

S4=str2double (get (handles.S4,'string'));

%===========================

axes (handles.axes1);

cla (handles.axes1);

%======Π€ΠΎΡ€ΠΌΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅ Π²Π΅ΠΊΡ‚ΠΎΡ€ΠΎΠ²

CC = [S1 S2 S3 S4];

DD = [A2 A3 A4 A5;B2 B3 B4 B5;C2 C3 C4 C5];

BB = [A1 B1 C1];

Aeq = [1 1 1 1];

Beq = [1];

lb = zeros (4,1);

ub = [1 1 1 1];

f = CC;

A = -DD;

B = -BB;

[x, Fx] = linprog (f, A, B, Aeq, Beq, lb, ub);

%====================Π Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚Ρ‹

set (handles.T1,'string', num2str (x (1)));

set (handles.T2,'string', num2str (x (2)));

set (handles.T3,'string', num2str (x (3)));

set (handles.T4,'string', num2str (x (4)));

set (handles.CF,'string', num2str (Fx));

pie (x,[1 1 1 1]);

% —- 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)

set (handles.A1,'String','8');

set (handles.B1,'String','100');

set (handles.C1,'String','30');

%===========================

set (handles.A2,'String','10');

set (handles.B2,'String','90');

set (handles.C2,'String','45');

%===========================

set (handles.A3,'String','6');

set (handles.B3,'String','150');

set (handles.C3,'String','30');

%===========================

set (handles.A4,'String','8');

set (handles.B4,'String','75');

set (handles.C4,'String','20');

%===========================

set (handles.A5,'String','2');

set (handles.B5,'String','175');

set (handles.C5,'String','37');

%===========================

set (handles.S1,'String','800');

set (handles.S2,'String','400');

set (handles.S3,'String','600');

set (handles.S4,'String','500');

%===========================

set (handles.T1,'String','');

set (handles.T2,'String','');

set (handles.T3,'String','');

set (handles.T4,'String','');

set (handles.CF,'String','');

%===========================

cla (handles.axes1);

legend ('off');

% —- 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)

close;

function S1_Callback (hObject, eventdata, handles)

global S1;

% hObject handle to S1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

S1=str2double (get (hObject,'String'));

if isnan (S1)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of S1 as text

% str2double (get (hObject,'String')) returns contents of S1 as a double

% —- Executes during object creation, after setting all properties.

function S1_CreateFcn (hObject, eventdata, handles)

% hObject handle to S1 (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 S2_Callback (hObject, eventdata, handles)

global S2;

% hObject handle to S2 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

S2=str2double (get (hObject,'String'));

if isnan (S2)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of S2 as text

% str2double (get (hObject,'String')) returns contents of S2 as a double

% —- Executes during object creation, after setting all properties.

function S2_CreateFcn (hObject, eventdata, handles)

% hObject handle to S2 (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 S3_Callback (hObject, eventdata, handles)

global S3;

% hObject handle to S3 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

S3=str2double (get (hObject,'String'));

if isnan (S3)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of S3 as text

% str2double (get (hObject,'String')) returns contents of S3 as a double

% —- Executes during object creation, after setting all properties.

function S3_CreateFcn (hObject, eventdata, handles)

% hObject handle to S3 (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 S4_Callback (hObject, eventdata, handles)

global S4;

% hObject handle to S4 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

S4=str2double (get (hObject,'String'));

if isnan (S4)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of S4 as text

% str2double (get (hObject,'String')) returns contents of S4 as a double

% —- Executes during object creation, after setting all properties.

function S4_CreateFcn (hObject, eventdata, handles)

% hObject handle to S4 (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 T1_Callback (hObject, eventdata, handles)

% hObject handle to T1 (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 T1 as text

% str2double (get (hObject,'String')) returns contents of T1 as a double

% —- Executes during object creation, after setting all properties.

function T1_CreateFcn (hObject, eventdata, handles)

% hObject handle to T1 (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 T2_Callback (hObject, eventdata, handles)

% hObject handle to T2 (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 T2 as text

% str2double (get (hObject,'String')) returns contents of T2 as a double

% —- Executes during object creation, after setting all properties.

function T2_CreateFcn (hObject, eventdata, handles)

% hObject handle to T2 (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 T3_Callback (hObject, eventdata, handles)

% hObject handle to T3 (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 T3 as text

% str2double (get (hObject,'String')) returns contents of T3 as a double

% —- Executes during object creation, after setting all properties.

function T3_CreateFcn (hObject, eventdata, handles)

% hObject handle to T3 (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 T4_Callback (hObject, eventdata, handles)

% hObject handle to T4 (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 T4 as text

% str2double (get (hObject,'String')) returns contents of T4 as a double

% —- Executes during object creation, after setting all properties.

function T4_CreateFcn (hObject, eventdata, handles)

% hObject handle to T4 (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 CF_Callback (hObject, eventdata, handles)

% hObject handle to CF (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 CF as text

% str2double (get (hObject,'String')) returns contents of CF as a double

% —- Executes during object creation, after setting all properties.

function CF_CreateFcn (hObject, eventdata, handles)

% hObject handle to CF (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 during object creation, after setting all properties.

function C2_CreateFcn (hObject, eventdata, handles)

% hObject handle to C2 (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 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)

МодСль Π²Ρ‹Π±ΠΎΡ€Π° срСдств массовой ΠΈΠ½Ρ„ΠΎΡ€ΠΌΠ°Ρ†ΠΈΠΈ

function varargout = ModelSelectionMediaWindow (varargin)

% MODELSELECTIONMEDIAWINDOW MATLAB code for ModelSelectionMediaWindow. fig

% MODELSELECTIONMEDIAWINDOW, by itself, creates a new MODELSELECTIONMEDIAWINDOW or raises the existing

% singleton*.

%

% H = MODELSELECTIONMEDIAWINDOW returns the handle to a new MODELSELECTIONMEDIAWINDOW or the handle to

% the existing singleton*.

%

% MODELSELECTIONMEDIAWINDOW ('CALLBACK', hObject, eventData, handles,…) calls the local

% function named CALLBACK in MODELSELECTIONMEDIAWINDOW. M with the given input arguments.

%

% MODELSELECTIONMEDIAWINDOW ('Property','Value',…) creates a new MODELSELECTIONMEDIAWINDOW or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before ModelSelectionMediaWindow_OpeningFcn gets called. An

% unrecognized property name or invalid value makes property application

% stop. All inputs are passed to ModelSelectionMediaWindow_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 ModelSelectionMediaWindow

% Last Modified by GUIDE v2.5 20-Apr-2015 21:30:15

% Begin initialization code — DO NOT EDIT

gui_Singleton = 1;

gui_State = struct ('gui_Name', mfilename, …

'gui_Singleton', gui_Singleton, …

'gui_OpeningFcn', @ModelSelectionMediaWindow_OpeningFcn, …

'gui_OutputFcn', @ModelSelectionMediaWindow_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 ModelSelectionMediaWindow is made visible.

function ModelSelectionMediaWindow_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 ModelSelectionMediaWindow (see VARARGIN)

% Choose default command line output for ModelSelectionMediaWindow

handles.output = hObject;

% Update handles structure

guidata (hObject, handles);

% UIWAIT makes ModelSelectionMediaWindow wait for user response (see UIRESUME)

% uiwait (handles.ModelSelectionMediaWindow);

% —- Outputs from this function are returned to the command line.

function varargout = ModelSelectionMediaWindow_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;

function A1_Callback (hObject, eventdata, handles)

global A1;

% hObject handle to A1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

A1=str2double (get (hObject,'String'));

if isnan (A1)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of A1 as text

% str2double (get (hObject,'String')) returns contents of A1 as a double

% —- Executes during object creation, after setting all properties.

function A1_CreateFcn (hObject, eventdata, handles)

% hObject handle to A1 (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 A2_Callback (hObject, eventdata, handles)

global A2;

% hObject handle to A2 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

A2=str2double (get (hObject,'String'));

if isnan (A2)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of A2 as text

% str2double (get (hObject,'String')) returns contents of A2 as a double

% —- Executes during object creation, after setting all properties.

function A2_CreateFcn (hObject, eventdata, handles)

% hObject handle to A2 (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 B1_Callback (hObject, eventdata, handles)

global B1;

% hObject handle to B1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

B1=str2double (get (hObject,'String'));

if isnan (B1)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of B1 as text

% str2double (get (hObject,'String')) returns contents of B1 as a double

% —- Executes during object creation, after setting all properties.

function B1_CreateFcn (hObject, eventdata, handles)

% hObject handle to B1 (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 B2_Callback (hObject, eventdata, handles)

global B2;

% hObject handle to B2 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

B2=str2double (get (hObject,'String'));

if isnan (B2)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of B2 as text

% str2double (get (hObject,'String')) returns contents of B2 as a double

% —- Executes during object creation, after setting all properties.

function B2_CreateFcn (hObject, eventdata, handles)

% hObject handle to B2 (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 C1_Callback (hObject, eventdata, handles)

global C1;

% hObject handle to C1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

C1=str2double (get (hObject,'String'));

if isnan (C1)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of C1 as text

% str2double (get (hObject,'String')) returns contents of C1 as a double

% —- Executes during object creation, after setting all properties.

function C1_CreateFcn (hObject, eventdata, handles)

% hObject handle to C1 (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 C2_Callback (hObject, eventdata, handles)

global C2;

% hObject handle to C2 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

C2=str2double (get (hObject,'String'));

if isnan (C2)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of C2 as text

% str2double (get (hObject,'String')) returns contents of C2 as a double

% —- Executes during object creation, after setting all properties.

function C2_CreateFcn (hObject, eventdata, handles)

% hObject handle to C2 (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 A3_Callback (hObject, eventdata, handles)

global A3;

% hObject handle to A3 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

A3=str2double (get (hObject,'String'));

if isnan (A3)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of A3 as text

% str2double (get (hObject,'String')) returns contents of A3 as a double

% —- Executes during object creation, after setting all properties.

function A3_CreateFcn (hObject, eventdata, handles)

% hObject handle to A3 (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 A4_Callback (hObject, eventdata, handles)

global A4;

% hObject handle to A4 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

A4=str2double (get (hObject,'String'));

if isnan (A4)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of A4 as text

% str2double (get (hObject,'String')) returns contents of A4 as a double

% —- Executes during object creation, after setting all properties.

function A4_CreateFcn (hObject, eventdata, handles)

% hObject handle to A4 (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 B3_Callback (hObject, eventdata, handles)

global B3;

% hObject handle to B3 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

B3=str2double (get (hObject,'String'));

if isnan (B3)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of B3 as text

% str2double (get (hObject,'String')) returns contents of B3 as a double

% —- Executes during object creation, after setting all properties.

function B3_CreateFcn (hObject, eventdata, handles)

% hObject handle to B3 (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 B4_Callback (hObject, eventdata, handles)

global B4;

% hObject handle to B4 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

B4=str2double (get (hObject,'String'));

if isnan (B4)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of B4 as text

% str2double (get (hObject,'String')) returns contents of B4 as a double

% —- Executes during object creation, after setting all properties.

function B4_CreateFcn (hObject, eventdata, handles)

% hObject handle to B4 (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 C3_Callback (hObject, eventdata, handles)

global C3;

% hObject handle to C3 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

C3=str2double (get (hObject,'String'));

if isnan (C3)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of C3 as text

% str2double (get (hObject,'String')) returns contents of C3 as a double

% —- Executes during object creation, after setting all properties.

function C3_CreateFcn (hObject, eventdata, handles)

% hObject handle to C3 (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 C4_Callback (hObject, eventdata, handles)

global C4;

% hObject handle to C4 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

C4=str2double (get (hObject,'String'));

if isnan (C4)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of C4 as text

% str2double (get (hObject,'String')) returns contents of C4 as a double

% —- Executes during object creation, after setting all properties.

function C4_CreateFcn (hObject, eventdata, handles)

% hObject handle to C4 (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)

% 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)

global A1;

global B1;

global C1;

%========

global A2

global B2;

global C2;

%========

global A3;

global B3;

global C3;

%========

global A4;

global B4;

global C4;

%========

% 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)

A1=str2double (get (handles.A1,'string'));

B1=str2double (get (handles.B1,'string'));

C1=str2double (get (handles.C1,'string'));

%===========================

A2=str2double (get (handles.A2,'string'));

B2=str2double (get (handles.B2,'string'));

C2=str2double (get (handles.C2,'string'));

%===========================

A3=str2double (get (handles.A3,'string'));

B3=str2double (get (handles.B3,'string'));

C3=str2double (get (handles.C3,'string'));

%===========================

A4=str2double (get (handles.A4,'string'));

B4=str2double (get (handles.B4,'string'));

C4=str2double (get (handles.C4,'string'));

%===========================

axes (handles.axes1);

cla (handles.axes1);

%======Π€ΠΎΡ€ΠΌΠΈΡ€ΠΎΠ²Π°Π½ΠΈΠ΅ Π²Π΅ΠΊΡ‚ΠΎΡ€ΠΎΠ²

CC = [A3 A4 B3 B4 C3 C4]; %ЦСлСвая функция

DD = [A2 A2 B2 B2 C2 C2;

— A1 -A1 -B1 -B1 -C1 -C1;1 1 0 0 0 0;

0 0 1 1 0 0;0 0 0 0 1 1;1 0 0 0 0 0;0 0 1 0 0 0;0 0 0 0 1 0;1 1 -3 -3 1 1];

BB = [72 000 -1 800 000 25 25 25 10 10 10 0];

lb = zeros (4,1);

f = -CC;%ЦСлСвая функция

A = DD;

B = BB;

[xy, Fx] = linprog (f, A, B,[],[], lb,[]);

%====================Π Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚Ρ‹

set (handles.X1,'string', num2str (xy (1)));

set (handles.X2,'string', num2str (xy (2)));

set (handles.X3,'string', num2str (xy (3)));

set (handles.Y1,'string', num2str (xy (4)));

set (handles.Y2,'string', num2str (xy (5)));

set (handles.Y3,'string', num2str (xy (6)));

set (handles.CF,'string', num2str (-Fx));

pie (xy,[1 1 1 1 1 1]);

% —- 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)

set (handles.A1,'String','30 000');

set (handles.B1,'String','60 000');

set (handles.C1,'String','90 000');

%===========================

set (handles.A2,'String','1700');

set (handles.B2,'String','2800');

set (handles.C2,'String','1000');

%===========================

set (handles.A3,'String','60');

set (handles.B3,'String','80');

set (handles.C3,'String','70');

%===========================

set (handles.A4,'String','40');

set (handles.B4,'String','55');

set (handles.C4,'String','35');

%===========================

set (handles.X1,'String','');

set (handles.X2,'String','');

set (handles.X3,'String','');

set (handles.Y1,'String','');

set (handles.Y2,'String','');

set (handles.Y3,'String','');

set (handles.CF,'String','');

%===========================

cla (handles.axes1);

legend ('off');

% —- 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)

close;

function X1_Callback (hObject, eventdata, handles)

% hObject handle to X1 (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 X1 as text

% str2double (get (hObject,'String')) returns contents of X1 as a double

% —- Executes during object creation, after setting all properties.

function X1_CreateFcn (hObject, eventdata, handles)

% hObject handle to X1 (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 X2_Callback (hObject, eventdata, handles)

% hObject handle to X2 (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 X2 as text

% str2double (get (hObject,'String')) returns contents of X2 as a double

% —- Executes during object creation, after setting all properties.

function X2_CreateFcn (hObject, eventdata, handles)

% hObject handle to X2 (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 X3_Callback (hObject, eventdata, handles)

% hObject handle to X3 (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 X3 as text

% str2double (get (hObject,'String')) returns contents of X3 as a double

% —- Executes during object creation, after setting all properties.

function X3_CreateFcn (hObject, eventdata, handles)

% hObject handle to X3 (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 Y1_Callback (hObject, eventdata, handles)

% hObject handle to Y1 (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 Y1 as text

% str2double (get (hObject,'String')) returns contents of Y1 as a double

% —- Executes during object creation, after setting all properties.

function Y1_CreateFcn (hObject, eventdata, handles)

% hObject handle to Y1 (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 Y2_Callback (hObject, eventdata, handles)

% hObject handle to Y2 (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 Y2 as text

% str2double (get (hObject,'String')) returns contents of Y2 as a double

% —- Executes during object creation, after setting all properties.

function Y2_CreateFcn (hObject, eventdata, handles)

% hObject handle to Y2 (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 Y3_Callback (hObject, eventdata, handles)

% hObject handle to Y3 (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 Y3 as text

% str2double (get (hObject,'String')) returns contents of Y3 as a double

% —- Executes during object creation, after setting all properties.

function Y3_CreateFcn (hObject, eventdata, handles)

% hObject handle to Y3 (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 CF_Callback (hObject, eventdata, handles)

% hObject handle to CF (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 CF as text

% str2double (get (hObject,'String')) returns contents of CF as a double

% —- Executes during object creation, after setting all properties.

function CF_CreateFcn (hObject, eventdata, handles)

% hObject handle to CF (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 varargout = BondYieldAtMaturityAtTheEndOfWindow (varargin)

% BONDYIELDATMATURITYATTHEENDOFWINDOW MATLAB code for BondYieldAtMaturityAtTheEndOfWindow. fig

% BONDYIELDATMATURITYATTHEENDOFWINDOW, by itself, creates a new BONDYIELDATMATURITYATTHEENDOFWINDOW or raises the existing

% singleton*.

%

% H = BONDYIELDATMATURITYATTHEENDOFWINDOW returns the handle to a new BONDYIELDATMATURITYATTHEENDOFWINDOW or the handle to

% the existing singleton*.

%

% BONDYIELDATMATURITYATTHEENDOFWINDOW ('CALLBACK', hObject, eventData, handles,…) calls the local

% function named CALLBACK in BONDYIELDATMATURITYATTHEENDOFWINDOW. M with the given input arguments.

%

% BONDYIELDATMATURITYATTHEENDOFWINDOW ('Property','Value',…) creates a new BONDYIELDATMATURITYATTHEENDOFWINDOW or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before BondYieldAtMaturityAtTheEndOfWindow_OpeningFcn gets called. An

% unrecognized property name or invalid value makes property application

% stop. All inputs are passed to BondYieldAtMaturityAtTheEndOfWindow_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 BondYieldAtMaturityAtTheEndOfWindow

% Last Modified by GUIDE v2.5 20-Apr-2015 15:34:41

% Begin initialization code — DO NOT EDIT

gui_Singleton = 1;

gui_State = struct ('gui_Name', mfilename, …

'gui_Singleton', gui_Singleton, …

'gui_OpeningFcn', @BondYieldAtMaturityAtTheEndOfWindow_OpeningFcn, …

'gui_OutputFcn', @BondYieldAtMaturityAtTheEndOfWindow_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 BondYieldAtMaturityAtTheEndOfWindow is made visible.

function BondYieldAtMaturityAtTheEndOfWindow_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 BondYieldAtMaturityAtTheEndOfWindow (see VARARGIN)

% Choose default command line output for BondYieldAtMaturityAtTheEndOfWindow

handles.output = hObject;

% Update handles structure

guidata (hObject, handles);

% UIWAIT makes BondYieldAtMaturityAtTheEndOfWindow wait for user response (see UIRESUME)

% uiwait (handles.BondYieldAtMaturityAtTheEndOfWindow);

% —- Outputs from this function are returned to the command line.

function varargout = BondYieldAtMaturityAtTheEndOfWindow_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;

function k_Callback (hObject, eventdata, handles)

global k;

% hObject handle to k (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

k=str2double (get (hObject,'String'));

if isnan (k)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of k as text

% str2double (get (hObject,'String')) returns contents of k as a double

% —- Executes during object creation, after setting all properties.

function k_CreateFcn (hObject, eventdata, handles)

% hObject handle to k (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 n_Callback (hObject, eventdata, handles)

global n;

% hObject handle to n (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

n=str2double (get (hObject,'String'));

if isnan (n)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of n as text

% str2double (get (hObject,'String')) returns contents of n as a double

% —- Executes during object creation, after setting all properties.

function n_CreateFcn (hObject, eventdata, handles)

% hObject handle to n (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 a0_Callback (hObject, eventdata, handles)

global a0;

% hObject handle to a0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

a0=str2double (get (hObject,'String'));

if isnan (a0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of a0 as text

% str2double (get (hObject,'String')) returns contents of a0 as a double

% —- Executes during object creation, after setting all properties.

function a0_CreateFcn (hObject, eventdata, handles)

% hObject handle to a0 (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 An_Callback (hObject, eventdata, handles)

global An;

% hObject handle to An (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

An=str2double (get (hObject,'String'));

if isnan (An)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of An as text

% str2double (get (hObject,'String')) returns contents of An as a double

% —- Executes during object creation, after setting all properties.

function An_CreateFcn (hObject, eventdata, handles)

% hObject handle to An (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 P_Callback (hObject, eventdata, handles)

global P;

% hObject handle to P (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

P=str2double (get (hObject,'String'));

if isnan (P)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of P as text

% str2double (get (hObject,'String')) returns contents of P as a double

% —- Executes during object creation, after setting all properties.

function P_CreateFcn (hObject, eventdata, handles)

% hObject handle to P (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 b0_Callback (hObject, eventdata, handles)

global b0;

% hObject handle to b0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

b0=str2double (get (hObject,'String'));

if isnan (b0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of b0 as text

% str2double (get (hObject,'String')) returns contents of b0 as a double

% —- Executes during object creation, after setting all properties.

function b0_CreateFcn (hObject, eventdata, handles)

% hObject handle to b0 (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 L_Callback (hObject, eventdata, handles)

global L;

% hObject handle to L (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

L=str2double (get (hObject,'String'));

if isnan (L)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of L as text

% str2double (get (hObject,'String')) returns contents of L as a double

% —- Executes during object creation, after setting all properties.

function L_CreateFcn (hObject, eventdata, handles)

% hObject handle to L (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 N0_Callback (hObject, eventdata, handles)

global N0;

% hObject handle to N0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

N0=str2double (get (hObject,'String'));

if isnan (N0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of N0 as text

% str2double (get (hObject,'String')) returns contents of N0 as a double

% —- Executes during object creation, after setting all properties.

function N0_CreateFcn (hObject, eventdata, handles)

% hObject handle to N0 (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 edit9_Callback (hObject, eventdata, handles)

% hObject handle to edit9 (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 edit9 as text

% str2double (get (hObject,'String')) returns contents of edit9 as a double

% —- Executes during object creation, after setting all properties.

function edit9_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit9 (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 edit10_Callback (hObject, eventdata, handles)

% hObject handle to edit10 (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 edit10 as text

% str2double (get (hObject,'String')) returns contents of edit10 as a double

% —- Executes during object creation, after setting all properties.

function edit10_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit10 (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 edit11_Callback (hObject, eventdata, handles)

% hObject handle to edit11 (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 edit11 as text

% str2double (get (hObject,'String')) returns contents of edit11 as a double

% —- Executes during object creation, after setting all properties.

function edit11_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit11 (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 edit12_Callback (hObject, eventdata, handles)

% hObject handle to edit12 (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 edit12 as text

% str2double (get (hObject,'String')) returns contents of edit12 as a double

% —- Executes during object creation, after setting all properties.

function edit12_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit12 (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 edit13_Callback (hObject, eventdata, handles)

% hObject handle to edit13 (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 edit13 as text

% str2double (get (hObject,'String')) returns contents of edit13 as a double

% —- Executes during object creation, after setting all properties.

function edit13_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit13 (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 edit14_Callback (hObject, eventdata, handles)

% hObject handle to edit14 (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 edit14 as text

% str2double (get (hObject,'String')) returns contents of edit14 as a double

% —- Executes during object creation, after setting all properties.

function edit14_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit14 (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 edit15_Callback (hObject, eventdata, handles)

% hObject handle to edit15 (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 edit15 as text

% str2double (get (hObject,'String')) returns contents of edit15 as a double

% —- Executes during object creation, after setting all properties.

function edit15_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit15 (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 edit16_Callback (hObject, eventdata, handles)

% hObject handle to edit16 (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 edit16 as text

% str2double (get (hObject,'String')) returns contents of edit16 as a double

% —- Executes during object creation, after setting all properties.

function edit16_CreateFcn (hObject, eventdata, handles)

% hObject handle to edit16 (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)

global k;

global P;

global n;

global An;

global a0;

global b0;

global L;

global N0;

% 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)

k=str2double (get (handles.k,'string'));

P=str2double (get (handles.P,'string'));

n=str2double (get (handles.n,'string'));

An=str2double (get (handles.An,'string'));

a0=str2double (get (handles.a0,'string'));

b0=str2double (get (handles.b0,'string'));

L=str2double (get (handles.L,'string'));

N0=str2double (get (handles.N0,'string'));

set (handles.uitable1,'data',[]);

axes (handles.axes1);

cla (handles.axes1);

if (a0==0)—(b0==0)—(An<=0)—(P<=0)—(k<=0)

errordlg ('Ошибка. УсловиС a0<>0, b0<>0, An>0,P>0,k>0. ВычислСния ΠΏΡ€Π΅Ρ€Π²Π°Π½Ρ‹!','Error');

return;

end

if (a0==0)—(b0==0)—(An<=0)—(P<=0)—(k<=0)

errordlg ('Ошибка. УсловиС a0<>0, b0<>0, An>0,P>0,k>0. ВычислСния ΠΏΡ€Π΅Ρ€Π²Π°Π½Ρ‹!','Error');

return;

end

I=P*k;%Π²Π΅Π»ΠΈΡ‡ΠΈΠ½Π° ΠΊΡƒΠΏΠΎΠ½Π½Ρ‹Ρ… ΠΏΠ»Π°Ρ‚Π΅ΠΆΠ΅ΠΉ

Ya=(I+P)*a0^(-n)-P*a0^(-n+1)+An*a0-(An+I);%Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π² Π½Π°Ρ‡Π°Π»Π΅ ΠΎΡ‚Ρ€Π΅Π·ΠΊΠ°

Yb=(I+P)*b0^(-n)-P*b0^(-n+1)+An*b0-(An+I);%Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π² ΠΊΠΎΠ½Ρ†Π΅ ΠΎΡ‚Ρ€Π΅Π·ΠΊΠ°

if Ya*Yb>=0

errordlg ('Ошибка. ΠŸΡ€ΠΎΠΈΠ·Π²Π΅Π΄Π΅Π½ΠΈΠ΅ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠΉ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π½Π° ΠΊΠΎΠ½Ρ†Π°Ρ… ΠΎΡ‚Ρ€Π΅Π·ΠΊΠ° Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ ΠΎΡ‚Ρ€ΠΈΡ†Π°Ρ‚Π΅Π»ΡŒΠ½Ρ‹ΠΌ. ВычислСния ΠΏΡ€Π΅Ρ€Π²Π°Π½Ρ‹!','Error');

return;

end

Eps=0.001; %Π’ΠΎΡ‡Π½ΠΎΡΡ‚ΡŒ Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ цравнСния

Yc=Ya;

c=a0;

while abs (Yc)>=Eps

Ya=(I+P)*a0^(-n)-P*a0^(-n+1)+An*a0-(An+I);%Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π² Π½Π°Ρ‡Π°Π»Π΅ ΠΎΡ‚Ρ€Π΅Π·ΠΊΠ°

Yb=(I+P)*b0^(-n)-P*b0^(-n+1)+An*b0-(An+I);%Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π² ΠΊΠΎΠ½Ρ†Π΅ ΠΎΡ‚Ρ€Π΅Π·ΠΊΠ°

c=(a0+b0)/2;

Yc=(I+P)*c^(-n)-P*c^(-n+1)+An*c-(An+I);

if Ya*Yc<0

b0=c;

end

if Yb*Yc<0

a0=c;

end

end

set (handles.x,'string', num2str (c));%ΠΊΠΎΡ€Π΅Π½ΡŒ уравнСния

y=c-1;

set (handles.y,'string', num2str (y));%процСнтная ставка

set (handles.I,'string', num2str (I));%ΠΊΠΎΡ€Π΅Π½ΡŒ уравнСния

%=====================ΠΠ°Ρ‡Π°Π»ΡŒΠ½Ρ‹Π΅ значСния

Ns=4;%кол-во шагов

res (1,1)=0; %Π‘Ρ‡Π΅Ρ‚Ρ‡ΠΈΠΊ шагов

res (1,2)=N0; %N0

res (1,3)=I*(1-(1+y)^(-n+N0))/y+P*(1+y)^(-n+N0);%Ak0

res (1,4)=1/res (1,3);%dt0

res (1,5)=((An-res (1,3))/An)*100;%dch0

res (1,6)=((I+An-res (1,3))/An)*100;%Np0

for i=2:(Ns+1)

res (i, 1)=i-1;%Π‘Ρ‡Π΅Ρ‚Ρ‡ΠΈΠΊ

res (i, 2)=N0+(i-1)*L;%N

res (i, 3)=I*(1-(1+y)^(-n+res (i, 2)))/y+P*(1+y)^(-n+res (i, 2));%Ak

res (i, 4)=1/res (i, 3);%dt

res (i, 5)=((An-res (i, 3)))*100/An;%dch

res (i, 6)=((I+An-res (i, 3))/An)*100;%Np

end

set (handles.uitable1,'data', res);

popup_sel_index = get (handles.popupmenu1, 'Value');

switch popup_sel_index

case 1

gr = plot (res (, 1), res (, 2),'b');

title ('ΠŸΠ΅Ρ€ΠΈΠΎΠ΄ Π²Ρ€Π΅ΠΌΠ΅Π½ΠΈ послС выпуска ΠΎΠ±Π»ΠΈΠ³Π°Ρ†ΠΈΠΈ');

grid on;

xlabel ('ΠŸΠ΅Ρ€ΠΈΠΎΠ΄');

ylabel ('ΠŸΠ΅Ρ€ΠΈΠΎΠ΄');

set (gr,'LineWidth', 2);

case 2

gr = plot (res (, 1), res (, 3),'b');

title ('ВСкущая ΡΡ‚ΠΎΠΈΠΌΠΎΡΡ‚ΡŒ ΠΎΠ±Π»ΠΈΠ³Π°Ρ†ΠΈΠΈ');

grid on;

xlabel ('ΠŸΠ΅Ρ€ΠΈΠΎΠ΄');

ylabel ('Π”Π΅Π½Π΅ΠΆΠ½Ρ‹Π΅ Π΅Π΄ΠΈΠ½ΠΈΡ†Ρ‹');

set (gr,'LineWidth', 2);

case 3

gr = plot (res (, 1), res (, 4),'b');

title ('ВСкущая Π΄ΠΎΡ…ΠΎΠ΄Π½ΠΎΡΡ‚ΡŒ ΠΎΠ±Π»ΠΈΠ³Π°Ρ†ΠΈΠΈ');

grid on;

xlabel ('ΠŸΠ΅Ρ€ΠΈΠΎΠ΄');

ylabel ('Π”Π΅Π½Π΅ΠΆΠ½Ρ‹Π΅ Π΅Π΄ΠΈΠ½ΠΈΡ†Ρ‹');

set (gr,'LineWidth', 2);

case 4

gr = plot (res (, 1), res (, 5),'b');

title ('Π”ΠΎΡ…ΠΎΠ΄Π½ΠΎΡΡ‚ΡŒ ΠΎΠ±Π»ΠΈΠ³Π°Ρ†ΠΈΠΈ Π·Π° ΡΡ‡Π΅Ρ‚ измСнСния Ρ†Π΅Π½Ρ‹');

grid on;

xlabel ('ΠŸΠ΅Ρ€ΠΈΠΎΠ΄');

ylabel ('%');

set (gr,'LineWidth', 2);

case 5

gr = plot (res (, 1), res (, 6),'b');

title ('Норма ΠΏΡ€ΠΈΠ±Ρ‹Π»ΠΈ ΠΎΠ±Π»ΠΈΠ³Π°Ρ†ΠΈΠΈ');

grid on;

xlabel ('ΠŸΠ΅Ρ€ΠΈΠΎΠ΄');

ylabel ('%');

set (gr,'LineWidth', 2);

end

% —- 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)

set (handles.k,'String','0.15');

set (handles.P,'String','1000');

set (handles.n,'String','14');

set (handles.An,'String','1368.

33');

set (handles.a0,'String','1.05');

set (handles.b0,'String','1.15');

set (handles.L,'String','3');

set (handles.N0,'String','1');

set (handles.x,'String','');

set (handles.y,'String','');

set (handles.I,'String','');

%===========================

set (handles.uitable1,'data',[]);

cla (handles.axes1);

legend ('off');

% —- 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)

close;

% —- Executes on selection change in popupmenu1.

function popupmenu1_Callback (hObject, eventdata, handles)

% hObject handle to popupmenu1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

set (handles.uitable1,'data',[]);

cla (handles.axes1);

legend off;

% Hints: contents = cellstr (get (hObject,'String')) returns popupmenu1 contents as cell array

% contents{get (hObject,'Value')} returns selected item from popupmenu1

% —- Executes during object creation, after setting all properties.

function popupmenu1_CreateFcn (hObject, eventdata, handles)

% hObject handle to popupmenu1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles empty — handles not created until after all CreateFcns called

% Hint: popupmenu 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 x_Callback (hObject, eventdata, handles)

% hObject handle to x (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 x as text

% str2double (get (hObject,'String')) returns contents of x as a double

% —- Executes during object creation, after setting all properties.

function x_CreateFcn (hObject, eventdata, handles)

% hObject handle to x (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 y_Callback (hObject, eventdata, handles)

% hObject handle to y (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 y as text

% str2double (get (hObject,'String')) returns contents of y as a double

% —- Executes during object creation, after setting all properties.

function y_CreateFcn (hObject, eventdata, handles)

% hObject handle to y (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 I_Callback (hObject, eventdata, handles)

% hObject handle to I (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 I as text

% str2double (get (hObject,'String')) returns contents of I as a double

% —- Executes during object creation, after setting all properties.

function I_CreateFcn (hObject, eventdata, handles)

% hObject handle to I (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 varargout = ModelProfitabilityOfBankingOperationsWindow (varargin)

% MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW MATLAB code for ModelProfitabilityOfBankingOperationsWindow. fig

% MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW, by itself, creates a new MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW or raises the existing

% singleton*.

%

% H = MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW returns the handle to a new MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW or the handle to

% the existing singleton*.

%

% MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW ('CALLBACK', hObject, eventData, handles,…) calls the local

% function named CALLBACK in MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW. M with the given input arguments.

%

% MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW ('Property','Value',…) creates a new MODELPROFITABILITYOFBANKINGOPERATIONSWINDOW or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before ModelProfitabilityOfBankingOperationsWindow_OpeningFcn gets called. An

% unrecognized property name or invalid value makes property application

% stop. All inputs are passed to ModelProfitabilityOfBankingOperationsWindow_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 ModelProfitabilityOfBankingOperationsWindow

% Last Modified by GUIDE v2.5 20-Apr-2015 17:29:59

% Begin initialization code — DO NOT EDIT

gui_Singleton = 1;

gui_State = struct ('gui_Name', mfilename, …

'gui_Singleton', gui_Singleton, …

'gui_OpeningFcn', @ModelProfitabilityOfBankingOperationsWindow_OpeningFcn, …

'gui_OutputFcn', @ModelProfitabilityOfBankingOperationsWindow_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 ModelProfitabilityOfBankingOperationsWindow is made visible.

function ModelProfitabilityOfBankingOperationsWindow_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 ModelProfitabilityOfBankingOperationsWindow (see VARARGIN)

% Choose default command line output for ModelProfitabilityOfBankingOperationsWindow

handles.output = hObject;

% Update handles structure

guidata (hObject, handles);

% UIWAIT makes ModelProfitabilityOfBankingOperationsWindow wait for user response (see UIRESUME)

% uiwait (handles.ModelProfitabilityOfBankingOperationsWindow);

% —- Outputs from this function are returned to the command line.

function varargout = ModelProfitabilityOfBankingOperationsWindow_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;

function Np_Callback (hObject, eventdata, handles)

global Np;

% hObject handle to Np (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

Np=str2double (get (hObject,'String'));

if isnan (Np)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of Np as text

% str2double (get (hObject,'String')) returns contents of Np as a double

% —- Executes during object creation, after setting all properties.

function Np_CreateFcn (hObject, eventdata, handles)

% hObject handle to Np (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 D_Callback (hObject, eventdata, handles)

global D;

% hObject handle to D (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

D=str2double (get (hObject,'String'));

if isnan (D)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of D as text

% str2double (get (hObject,'String')) returns contents of D as a double

% —- Executes during object creation, after setting all properties.

function D_CreateFcn (hObject, eventdata, handles)

% hObject handle to D (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 a0_Callback (hObject, eventdata, handles)

global a0;

% hObject handle to a0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

a0=str2double (get (hObject,'String'));

if isnan (a0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of a0 as text

% str2double (get (hObject,'String')) returns contents of a0 as a double

% —- Executes during object creation, after setting all properties.

function a0_CreateFcn (hObject, eventdata, handles)

% hObject handle to a0 (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 Ns_Callback (hObject, eventdata, handles)

global Ns;

% hObject handle to Ns (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

Ns=str2double (get (hObject,'String'));

if isnan (Ns)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of Ns as text

% str2double (get (hObject,'String')) returns contents of Ns as a double

% —- Executes during object creation, after setting all properties.

function Ns_CreateFcn (hObject, eventdata, handles)

% hObject handle to Ns (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 b0_Callback (hObject, eventdata, handles)

global b0;

% hObject handle to b0 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

b0=str2double (get (hObject,'String'));

if isnan (b0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% Hints: get (hObject,'String') returns contents of b0 as text

% str2double (get (hObject,'String')) returns contents of b0 as a double

% —- Executes during object creation, after setting all properties.

function b0_CreateFcn (hObject, eventdata, handles)

% hObject handle to b0 (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)

global Np;

global Ns;

global D;

global a0;

global b0

% 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)

Np=str2double (get (handles.Np,'string'));

Ns=str2double (get (handles.Ns,'string'));

D=str2double (get (handles.D,'string'));

a0=str2double (get (handles.a0,'string'));

b0=str2double (get (handles.b0,'string'));

if (a0==0)—(b0==0)

errordlg ('Ошибка. УсловиС a0<>0, b0<>0. ВычислСния ΠΏΡ€Π΅Ρ€Π²Π°Π½Ρ‹!','Error');

return;

end

Ya=-1000*a0^(Np)+412*a0^(Ns)+D;%Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π² Π½Π°Ρ‡Π°Π»Π΅ ΠΎΡ‚Ρ€Π΅Π·ΠΊΠ°

Yb=-1000*b0^(Np)+412*b0^(Ns)+D;%Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π² ΠΊΠΎΠ½Ρ†Π΅ ΠΎΡ‚Ρ€Π΅Π·ΠΊΠ°

if Ya*Yb>=0

errordlg ('Ошибка. ΠŸΡ€ΠΎΠΈΠ·Π²Π΅Π΄Π΅Π½ΠΈΠ΅ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠΉ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π½Π° ΠΊΠΎΠ½Ρ†Π°Ρ… ΠΎΡ‚Ρ€Π΅Π·ΠΊΠ° Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ ΠΎΡ‚Ρ€ΠΈΡ†Π°Ρ‚Π΅Π»ΡŒΠ½Ρ‹ΠΌ. ВычислСния ΠΏΡ€Π΅Ρ€Π²Π°Π½Ρ‹!','Error');

return;

end

Eps=0.001; %Π’ΠΎΡ‡Π½ΠΎΡΡ‚ΡŒ Ρ€Π΅ΡˆΠ΅Π½ΠΈΡ цравнСния

Yc=Ya;

c=a0;

while abs (Yc)>=Eps

Ya=-1000*a0^(Np)+412*a0^(Ns)+D;%Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π² Π½Π°Ρ‡Π°Π»Π΅ ΠΎΡ‚Ρ€Π΅Π·ΠΊΠ°

Yb=-1000*b0^(Np)+412*b0^(Ns)+D;%Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Ρ„ΡƒΠ½ΠΊΡ†ΠΈΠΈ Π² ΠΊΠΎΠ½Ρ†Π΅ ΠΎΡ‚Ρ€Π΅Π·ΠΊΠ°

c=(a0+b0)/2;

Yc=-1000*c^(Np)+412*c^(Ns)+D;

if Ya*Yc<0

b0=c;

end

if Yb*Yc<0

a0=c;

end

end

set (handles.x,'string', num2str (c));%ΠΊΠΎΡ€Π΅Π½ΡŒ уравнСния

y=c-1;

PrPr=y*100;

set (handles.Pr,'string', num2str (y));%процСнтная ставка

set (handles.PrPr,'string', num2str (PrPr));%ΠΊΠΎΡ€Π΅Π½ΡŒ уравнСния

% —- 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)

set (handles.Np,'String','8');

set (handles.Ns,'String','4');

set (handles.D,'String','1412');

set (handles.a0,'String','0.96');

set (handles.b0,'String','1.22');

set (handles.x,'String','');

set (handles.Pr,'String','');

set (handles.PrPr,'String','');

% —- 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)

close;

function x_Callback (hObject, eventdata, handles)

% hObject handle to x (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 x as text

% str2double (get (hObject,'String')) returns contents of x as a double

% —- Executes during object creation, after setting all properties.

function x_CreateFcn (hObject, eventdata, handles)

% hObject handle to x (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 Pr_Callback (hObject, eventdata, handles)

% hObject handle to Pr (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 Pr as text

% str2double (get (hObject,'String')) returns contents of Pr as a double

% —- Executes during object creation, after setting all properties.

function Pr_CreateFcn (hObject, eventdata, handles)

% hObject handle to Pr (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 PrPr_Callback (hObject, eventdata, handles)

% hObject handle to PrPr (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 PrPr as text

% str2double (get (hObject,'String')) returns contents of PrPr as a double

% —- Executes during object creation, after setting all properties.

function PrPr_CreateFcn (hObject, eventdata, handles)

% hObject handle to PrPr (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 varargout = ModelSettlement (varargin)

% MODELSETTLEMENT MATLAB code for ModelSettlement. fig

% MODELSETTLEMENT, by itself, creates a new MODELSETTLEMENT or raises the existing

% singleton*.

%

% H = MODELSETTLEMENT returns the handle to a new MODELSETTLEMENT or the handle to

% the existing singleton*.

%

% MODELSETTLEMENT ('CALLBACK', hObject, eventData, handles,…) calls the local

% function named CALLBACK in MODELSETTLEMENT. M with the given input arguments.

%

% MODELSETTLEMENT ('Property','Value',…) creates a new MODELSETTLEMENT or raises the

% existing singleton*. Starting from the left, property value pairs are

% applied to the GUI before ModelSettlement_OpeningFcn gets called. An

% unrecognized property name or invalid value makes property application

% stop. All inputs are passed to ModelSettlement_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 ModelSettlement

% Last Modified by GUIDE v2.5 16-Apr-2015 22:43:08

% Begin initialization code — DO NOT EDIT

gui_Singleton = 1;

gui_State = struct ('gui_Name', mfilename, …

'gui_Singleton', gui_Singleton, …

'gui_OpeningFcn', @ModelSettlement_OpeningFcn, …

'gui_OutputFcn', @ModelSettlement_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 ModelSettlement is made visible.

function ModelSettlement_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 ModelSettlement (see VARARGIN)

% Choose default command line output for ModelSettlement

handles.output = hObject;

% Update handles structure

guidata (hObject, handles);

% UIWAIT makes ModelSettlement wait for user response (see UIRESUME)

% uiwait (handles.ModelSettlementWindow);

% —- Outputs from this function are returned to the command line.

function varargout = ModelSettlement_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;

function P0_Callback (hObject, eventdata, handles)

global P0;

% hObject handle to P0 (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 P0 as text

% str2double (get (hObject,'String')) returns contents of P0 as a double

% —- Executes during object creation, after setting all properties.

P0=str2double (get (hObject,'String'));

if isnan (P0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

function P0_CreateFcn (hObject, eventdata, handles)

% hObject handle to P0 (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 V0_Callback (hObject, eventdata, handles)

global V0;

% hObject handle to V0 (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 V0 as text

% str2double (get (hObject,'String')) returns contents of V0 as a double

V0=str2double (get (hObject,'String'));

if isnan (V0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% —- Executes during object creation, after setting all properties.

function V0_CreateFcn (hObject, eventdata, handles)

% hObject handle to V0 (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 T_Callback (hObject, eventdata, handles)

global T;

% hObject handle to T (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 T as text

% str2double (get (hObject,'String')) returns contents of T as a double

T=str2double (get (hObject,'String'));

if isnan (T)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% —- Executes during object creation, after setting all properties.

function T_CreateFcn (hObject, eventdata, handles)

% hObject handle to T (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 Delta_Callback (hObject, eventdata, handles)

global Delta;

% hObject handle to Delta (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 Delta as text

% str2double (get (hObject,'String')) returns contents of Delta as a double

Delta=str2double (get (hObject,'String'));

if isnan (Delta)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% —- Executes during object creation, after setting all properties.

function Delta_CreateFcn (hObject, eventdata, handles)

% hObject handle to Delta (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 Di_Callback (hObject, eventdata, handles)

global Di;

% hObject handle to Di (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 Di as text

% str2double (get (hObject,'String')) returns contents of Di as a double

Di=str2double (get (hObject,'String'));

if isnan (Di)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% —- Executes during object creation, after setting all properties.

function Di_CreateFcn (hObject, eventdata, handles)

% hObject handle to Di (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 Dk_Callback (hObject, eventdata, handles)

global Dk;

% hObject handle to Dk (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 Dk as text

% str2double (get (hObject,'String')) returns contents of Dk as a double

Dk=str2double (get (hObject,'String'));

if isnan (Dk)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% —- Executes during object creation, after setting all properties.

function Dk_CreateFcn (hObject, eventdata, handles)

% hObject handle to Dk (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 I0_Callback (hObject, eventdata, handles)

global I0;

% hObject handle to I0 (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 I0 as text

% str2double (get (hObject,'String')) returns contents of I0 as a double

I0=str2double (get (hObject,'String'));

if isnan (I0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% —- Executes during object creation, after setting all properties.

function I0_CreateFcn (hObject, eventdata, handles)

% hObject handle to I0 (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 K0_Callback (hObject, eventdata, handles)

global K0;

% hObject handle to K0 (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 K0 as text

% str2double (get (hObject,'String')) returns contents of K0 as a double

K0=str2double (get (hObject,'String'));

if isnan (K0)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% —- Executes during object creation, after setting all properties.

function K0_CreateFcn (hObject, eventdata, handles)

% hObject handle to K0 (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 a_Callback (hObject, eventdata, handles)

global a;

% hObject handle to a (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 a as text

% str2double (get (hObject,'String')) returns contents of a as a double

a=str2double (get (hObject,'String'));

if isnan (a)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% —- Executes during object creation, after setting all properties.

function a_CreateFcn (hObject, eventdata, handles)

% hObject handle to a (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 l_Callback (hObject, eventdata, handles)

global l;

% hObject handle to l (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 l as text

% str2double (get (hObject,'String')) returns contents of l as a double

l=str2double (get (hObject,'String'));

if isnan (l)

set (hObject, 'String', 0);

errordlg ('Π—Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±Ρ‹Ρ‚ΡŒ числовым','Error');

end

% —- Executes during object creation, after setting all properties.

function l_CreateFcn (hObject, eventdata, handles)

% hObject handle to l (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 pushbuttonCalculate.

function pushbuttonCalculate_Callback (hObject, eventdata, handles)

% hObject handle to pushbuttonCalculate (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

global P0;

global V0;

global T;

global Delta;

global Di;

global Dk;

global I0;

global K0;

global a;

global l;

P0=str2double (get (handles.P0,'string'));

V0=str2double (get (handles.V0,'string'));

T=str2double (get (handles.T,'string'));

Delta=str2double (get (handles.Delta,'string'));

Di=str2double (get (handles.Di,'string'));

Dk=str2double (get (handles.Dk,'string'));

I0=str2double (get (handles.I0,'string'));

K0=str2double (get (handles.K0,'string'));

a=str2double (get (handles.a,'string'));

l=str2double (get (handles.l,'string'));

if (l<=1)—(K0==0)—(T==0)

errordlg ('Ошибка. УсловиС l>1, K0<>0, T<>0. ВычислСния ΠΏΡ€Π΅Ρ€Π²Π°Π½Ρ‹!','Error');

return;

end

for i=1:l

Result (i, 1)=I0+Di*(i);%I

Result (i, 2)=K0+Dk*(i);%%K

Result (i, 3)=Result (i, 2)/Result (i, 1);%Alpha

Result (i, 4)=Result (i, 2)/(Result (i, 1)*K0);%Beta

end

Result (1,5)=1.1313*P0-P0/T;

Result (1,6)=1.133*V0-V0/T;

for i=2:l

Result (i, 5)=1.1313*Result (i-1,5)-Result (i-1,5)/T;%P

Result (i, 6)=1.132*Result (i-1,6)-Result (i-1,6)/T;%V

end

for i=1:l

Result (i, 7) = 0;

Result (i, 8) = 0;

for j=1:l

Result (i, 7)=Result (i, 7) + Result (i, 5)*Result (i, 3)*exp (-Delta*j);%S1

Result (i, 8)=Result (i, 8) + Result (i, 6)*Result (i, 4)*exp (-Delta*j);%S2

end

Result (i, 9)=Result (i, 8)+Result (i, 7);%S

end

h=(T-a)/l;

for i=1:l

Result (i, 11)=(Result (i, 7)+(Result (i, 5)*Result (i, 3))*(exp (-Delta*a)+exp (-Delta*T))/2)*h;%A1

Result (i, 12)=(Result (i, 8)+(Result (i, 6)*Result (i, 4))*(exp (-Delta*a)+exp (-Delta*T))/2)*h;%A2

Result (i, 10)=Result (i, 11)-Result (i, 12);

end;

set (handles.uitable1,'data', Result); %Π Π΅Π·ΡƒΠ»ΡŒΡ‚Π°Ρ‚Ρ‹ Π² Ρ‚Π°Π±Π»ΠΈΡ†Π΅

%РисуСм Π³Ρ€Π°Ρ„ΠΈΠΊΠΈ

axes (handles.axes1);

cla (handles.axes1);

popup_sel_index = get (handles.popupmenu1, 'Value');

switch popup_sel_index

case 1

kk=0:1:T-1;

gr = plot (kk, Result (, 5));

title ('ΠŸΠΎΡ‚ΠΎΠΊ поступлСний');

grid on;

xlabel ('ΠŸΠ΅Ρ€ΠΈΠΎΠ΄Ρ‹ Π΄ΠΎΠ³ΠΎΠ²ΠΎΡ€Π°');

ylabel ('Π”Π΅Π½ΡŒΠ³ΠΈ Π² ΡƒΡΠ»ΠΎΠ²Π½Ρ‹Ρ… Π΅Π΄ΠΈΠ½ΠΈΡ†Π°Ρ…');

set (gr,'LineWidth', 3);

case 2

kk=0:1:T-1;

gr = plot (kk, Result (, 6));

title ('ΠŸΠΎΡ‚ΠΎΠΊ Π²Ρ‹ΠΏΠ»Π°Ρ‚');

grid on;

xlabel ('ΠŸΠ΅Ρ€ΠΈΠΎΠ΄Ρ‹ Π΄ΠΎΠ³ΠΎΠ²ΠΎΡ€Π°');

ylabel ('Π”Π΅Π½ΡŒΠ³ΠΈ Π² Ρ€ΡƒΠ±Π»ΡΡ…');

set (gr,'LineWidth', 3);

case 3

kk=0:1:T-1;

gr = plot (kk, Result (, 11),'b');

set (gr,'LineWidth', 3);

hold on;

gr = plot (kk, Result (, 12),'r');

set (gr,'LineWidth', 3);

hold on;

gr = plot (kk, Result (, 10),'g');

set (gr,'LineWidth', 3);

title ('Π”ΠΎΠ³ΠΎΠ²ΠΎΡ€');

grid on;

xlabel ('ΠŸΠ΅Ρ€ΠΈΠΎΠ΄Ρ‹ Π΄ΠΎΠ³ΠΎΠ²ΠΎΡ€Π°');

ylabel ('Π”Π΅Π½Π΅ΠΆΠ½Ρ‹Π΅ ΠΏΠΎΡ‚ΠΎΠΊΠΈ (Ρ€ΡƒΠ±Π»Π΅ΠΉ)');

set (gr,'LineWidth', 3);

legend ('Π‘ΡƒΠΌΠΌΡ‹ поступлСний ΠΏΠΎ ΠΏΠ΅Ρ€ΠΈΠΎΠ΄Π°ΠΌ Π΄ΠΎΠ³ΠΎΠ²ΠΎΡ€Π°','Π‘ΡƒΠΌΠΌΡ‹ Π²Ρ‹ΠΏΠ»Π°Ρ‚ ΠΏΠΎ ΠΏΠ΅Ρ€ΠΈΠΎΠ΄Π°ΠΌ', 'Π‘ΡƒΠΌΠΌΡ‹ наличности ΠΏΠΎ ΠΏΠ΅Ρ€ΠΈΠΎΠ΄Π°ΠΌ Π΄ΠΎΠ³ΠΎΠ²ΠΎΡ€Π°');

end

% —- 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)

set (handles.P0,'String','10 000');

set (handles.V0,'String','50 000');

set (handles.T,'String','8');

set (handles.Delta,'String','0.1');

set (handles.Di,'String','0.1763');

set (handles.Dk,'String','0.85');

set (handles.I0,'String','1');

set (handles.K0,'String','27.8');

set (handles.a,'String','0');

set (handles.l,'String','8');

axes (handles.axes1);

cla (handles.axes1);

set (handles.uitable1,'data',[]);

% —- Executes on selection change in popupmenu1.

function popupmenu1_Callback (hObject, eventdata, handles)

axes (handles.axes1);

cla (handles.axes1);

set (handles.uitable1,'data',[]);

% hObject handle to popupmenu1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr (get (hObject,'String')) returns popupmenu1 contents as cell array

% contents{get (hObject,'Value')} returns selected item from popupmenu1

% —- Executes during object creation, after setting all properties.

function popupmenu1_CreateFcn (hObject, eventdata, handles)

% hObject handle to popupmenu1 (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles empty — handles not created until after all CreateFcns called

% Hint: popupmenu 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 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)

close;

% —- Executes during object deletion, before destroying properties.

function l_DeleteFcn (hObject, eventdata, handles)

% hObject handle to l (see GCBO)

% eventdata reserved — to be defined in a future version of MATLAB

% handles structure with handles and user data (see GUIDATA)

ΠŸΠΎΠΊΠ°Π·Π°Ρ‚ΡŒ вСсь тСкст
Π—Π°ΠΏΠΎΠ»Π½ΠΈΡ‚ΡŒ Ρ„ΠΎΡ€ΠΌΡƒ Ρ‚Π΅ΠΊΡƒΡ‰Π΅ΠΉ Ρ€Π°Π±ΠΎΡ‚ΠΎΠΉ
ΠšΡƒΠΏΠΈΡ‚ΡŒ Π³ΠΎΡ‚ΠΎΠ²ΡƒΡŽ Ρ€Π°Π±ΠΎΡ‚Ρƒ

Π˜Π›Π˜