0001 function varargout = IVPsolve(varargin)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041 gui_Singleton = 1;
0042 gui_State = struct('gui_Name', mfilename, ...
0043 'gui_Singleton', gui_Singleton, ...
0044 'gui_OpeningFcn', @IVPsolve_OpeningFcn, ...
0045 'gui_OutputFcn', @IVPsolve_OutputFcn, ...
0046 'gui_LayoutFcn', [] , ...
0047 'gui_Callback', []);
0048 if nargin && ischar(varargin{1})
0049 gui_State.gui_Callback = str2func(varargin{1});
0050 end
0051
0052 if nargout
0053 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0054 else
0055 gui_mainfcn(gui_State, varargin{:});
0056 end
0057
0058
0059
0060
0061
0062
0063 function IVPsolve_OpeningFcn(hObject, eventdata, handles, varargin)
0064 global SETTINGS
0065
0066
0067
0068
0069
0070
0071
0072 handles.output = hObject;
0073
0074
0075 guidata(hObject, handles);
0076
0077
0078 set(handles.save, 'CData', imread('./pix/matlab.jpg'));
0079 set(handles.pan , 'CData', imread('./pix/pan.jpg'));
0080 set(handles.zoom, 'CData', imread('./pix/zoom.jpg'));
0081 set(handles.legend, 'CData', imread('./pix/legend.jpg'));
0082 set(handles.start, 'CData', imread('./pix/milch.jpg'));
0083 set(handles.stab_button, 'CData', imread('./pix/button.jpg'));
0084 set(handles.info, 'CData', imread('./pix/info_button_blue.jpg'));
0085 set(handles.htmldocu, 'CData', imread('./pix/docu.jpg'));
0086
0087
0088 set(handles.etaa,'Enable','Off');
0089 set(handles.tolerance,'Enable','Off');
0090 set(handles.eta,'ForegroundColor',[200 200 200]/255);
0091 set(handles.tol,'ForegroundColor',[200 200 200]/255);
0092
0093 new_method='Herman';
0094 old_method='Hesse';
0095 do_stab=0;
0096 save data\do_stab.mat do_stab new_method -append
0097 save data\do_stab_old_method.mat old_method
0098
0099
0100
0101 load pix\stab_region_explizites-Eulerverfahren
0102 cla(handles.region_of_stability)
0103 axes(handles.region_of_stability);
0104 plot(x_vec,y_vec,'.')
0105 set(handles.stabilitaetsbereich,'String','Stabilitätsgebiet des Verfahrens');
0106 clear x_vec y_vec
0107
0108
0109
0110
0111
0112
0113
0114
0115 function varargout = IVPsolve_OutputFcn(hObject, eventdata, handles)
0116
0117
0118
0119
0120
0121
0122 varargout{1} = handles.output;
0123
0124
0125
0126 function stepsize_Callback(hObject, eventdata, handles)
0127
0128
0129
0130
0131
0132
0133
0134
0135
0136 function stepsize_CreateFcn(hObject, eventdata, handles)
0137
0138
0139
0140
0141
0142
0143 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0144 set(hObject,'BackgroundColor','white');
0145 end
0146
0147
0148
0149 function start_Callback(hObject, eventdata, handles)
0150
0151 global SETTINGS;
0152 global RESULT;
0153
0154 tic
0155
0156 SETTINGS = get_SETTINGS(handles);
0157 examples = get(handles.examples,'String');
0158 example = examples(get(handles.examples,'Value'));
0159
0160 if strcmp(SETTINGS.method,'Milne-Simpson(4)') & strcmp(example,'example 4') & get(handles.step_cont,'Value')==1
0161 errordlg('Milne-Simpson(4) with step control does not work for this IVP','error')
0162 else
0163
0164 do_stab=1;
0165 old_method = SETTINGS.method;
0166 new_method = SETTINGS.method;
0167 save data\do_stab.mat do_stab new_method -append
0168 save data\do_stab_old_method.mat old_method
0169
0170 if get(handles.step_cont,'Value')==1
0171
0172 SETTINGS.tolerance=str2num(get(handles.tolerance,'String'));
0173 SETTINGS.step_control=1;
0174
0175 [RESULT, SETTINGS] = ivp_solve(SETTINGS);
0176
0177 set(handles.stabilitaetsbereich,'String','calculated step sizes');
0178 set(handles.stab_button,'String','open in Matlab window');
0179 set(handles.etaa,'String',num2str(length(RESULT.steps)));
0180
0181
0182 size1 = size(RESULT.gridpoints);
0183 size2 = size(RESULT.steps);
0184 gridpoints = RESULT.gridpoints;
0185 steps = RESULT.steps;
0186
0187 if size1(2)~=size2(2)
0188 if size1<size2
0189 steps=steps(1:size1(2));
0190 else
0191 gridpoints=gridpoints(1:size2(2));
0192 end
0193 end
0194 else
0195 SETTINGS.step_control = 0;
0196 set(handles.stab_button,'String','analiyse region of stability');
0197 [RESULT, SETTINGS] = ivp_solve(SETTINGS);
0198
0199 end
0200
0201
0202
0203 cla(handles.solution_graphic)
0204
0205 axes(handles.solution_graphic);
0206 if get(handles.exakt_solution_known,'Value')
0207
0208 plot(RESULT.gridpoints,RESULT.numerical_solution,RESULT.gridpoints,RESULT.exact_solution,'r');
0209 [L2err,H1err,LI0err]= Error(SETTINGS.fu_exact,RESULT.gridpoints,RESULT.numerical_solution);
0210 set(handles.l_inf_error,'String',num2str(LI0err));
0211 set(handles.l_2_error,'String',num2str(L2err));
0212 set(handles.h_1_error,'String',num2str(H1err));
0213 else
0214
0215 plot(RESULT.gridpoints,RESULT.numerical_solution);
0216 set(handles.l_inf_error,'String','');
0217 set(handles.l_2_error,'String','');
0218 set(handles.h_1_error,'String','');
0219 end
0220 legend('numerical solution','exact solution');
0221
0222
0223
0224
0225 if SETTINGS.calculate_region_of_stability == 1 && SETTINGS.step_control==0
0226 cla(handles.region_of_stability)
0227 if isfield(RESULT,'y')
0228 set(handles.stabilitaetsbereich,'String','for these boundaries the region of stability is empty');
0229 else
0230
0231 axes(handles.region_of_stability);
0232 plot(RESULT.x,RESULT.y,'*');
0233 set(handles.stabilitaetsbereich,'String','region of stability');
0234 end
0235 end
0236
0237 if SETTINGS.step_control==1
0238 cla(handles.region_of_stability)
0239 axes(handles.region_of_stability);
0240 plot(gridpoints,steps)
0241 end
0242 disp_time=toc;
0243 set(handles.time,'String',[num2str(disp_time),' sec']);
0244 end
0245 zoom on;
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256 function Verfahren_inf_Callback(hObject, eventdata, handles)
0257 Informations;
0258
0259
0260
0261
0262
0263
0264 function methods_Callback(hObject, eventdata, handles)
0265
0266
0267
0268 methods = get(handles.methods,'String');
0269 actual_method=methods(get(handles.methods,'Value'));
0270 new_method=actual_method;
0271 save data\do_stab.mat new_method -append
0272 switch actual_method{1}
0273 case 'Gauß RKV'
0274 load pix\stab_region_Gauss
0275 cla(handles.region_of_stability)
0276 axes(handles.region_of_stability);
0277 plot(x_vec,y_vec,'.')
0278 set(handles.stabilitaetsbereich,'String','region of stability');
0279 set(handles.stab_button,'String','analiyse region of stability');
0280 clear x_vec y_vec
0281 case 'Adams-Bashforth(2)'
0282 load pix\stab_region_Adams-Bashforth(2)
0283 cla(handles.region_of_stability)
0284 axes(handles.region_of_stability);
0285 plot(x_vec,y_vec,'.')
0286 set(handles.stabilitaetsbereich,'String','region of stability');
0287 set(handles.stab_button,'String','analiyse region of stability');
0288 clear x_vec y_vec
0289 case 'Adams-Moulton(2)'
0290 load pix\stab_region_Adams-Moulton(2)
0291 cla(handles.region_of_stability)
0292 axes(handles.region_of_stability);
0293 plot(x_vec,y_vec,'.')
0294 set(handles.stabilitaetsbereich,'String','region of stability');
0295 set(handles.stab_button,'String','analiyse region of stability');
0296 clear x_vec y_vec
0297 case 'Milne-Simpson(4)'
0298 load pix\stab_region_Milne-Simpson(4)
0299 cla(handles.region_of_stability)
0300 axes(handles.region_of_stability);
0301 plot(x_vec,y_vec,'.')
0302 set(handles.stabilitaetsbereich,'String','Stabilitätsgebiet des Verfahrens');
0303 set(handles.stab_button,'String','analiyse region of stability');
0304 clear x_vec y_vec
0305 case 'Dormand-Prince RKV'
0306 load pix\stab_region_'Dormand-Prince RKV'
0307 cla(handles.region_of_stability)
0308 axes(handles.region_of_stability);
0309 plot(x_vec,y_vec,'.')
0310 set(handles.stabilitaetsbereich,'String','region of stability');
0311 set(handles.stab_button,'String','analiyse region of stability');
0312 clear x_vec y_vec
0313 case 'Adams-Bashforth(4)'
0314 load pix\stab_region_'Adams-Bashforth(4)'
0315 cla(handles.region_of_stability)
0316 axes(handles.region_of_stability);
0317 plot(x_vec,y_vec,'.')
0318 set(handles.stabilitaetsbereich,'String','region of stability');
0319 set(handles.stab_button,'String','analiyse region of stability');
0320 clear x_vec y_vec
0321 case 'implicit Euler-method'
0322 load pix\stab_region_implizites-Eulerverfahren
0323 cla(handles.region_of_stability)
0324 axes(handles.region_of_stability);
0325 plot(x_vec,y_vec,'.')
0326 set(handles.stabilitaetsbereich,'String','region of stability');
0327 set(handles.stab_button,'String','analiyse region of stability');
0328 clear x_vec y_vec
0329 case 'Heun-Verfahren'
0330 load pix\stab_region_Heun-Verfahren
0331 cla(handles.region_of_stability)
0332 axes(handles.region_of_stability);
0333 plot(x_vec,y_vec,'.')
0334 set(handles.stabilitaetsbereich,'String','region of stability');
0335 set(handles.stab_button,'String','analiyse region of stability');
0336 clear x_vec y_vec
0337 case 'BDF 5'
0338 load pix\stab_region_BDF5
0339 cla(handles.region_of_stability)
0340 axes(handles.region_of_stability);
0341 plot(x_vec,y_vec,'.')
0342 set(handles.stabilitaetsbereich,'String','region of stability');
0343 set(handles.stab_button,'String','analiyse region of stability');
0344 clear x_vec y_vec
0345 case 'BDF 2'
0346 load pix\stab_region_BDF2
0347 cla(handles.region_of_stability)
0348 axes(handles.region_of_stability);
0349 plot(x_vec,y_vec,'.')
0350 set(handles.stabilitaetsbereich,'String','region of stability');
0351 set(handles.stab_button,'String','analiyse region of stability');
0352 clear x_vec y_vec
0353 case 'explicit Euler-method'
0354 load pix\stab_region_explizites-Eulerverfahren
0355 cla(handles.region_of_stability)
0356 axes(handles.region_of_stability);
0357 plot(x_vec,y_vec,'.')
0358 set(handles.stabilitaetsbereich,'String','region of stability');
0359 set(handles.stab_button,'String','analiyse region of stability');
0360 clear x_vec y_vec
0361 case 'Radau II RKV'
0362 load pix\stab_region_Radau-II-RKV
0363 cla(handles.region_of_stability)
0364 axes(handles.region_of_stability);
0365 plot(x_vec,y_vec,'.')
0366 set(handles.stabilitaetsbereich,'String','region of stability');
0367 set(handles.stab_button,'String','analiyse region of stability');
0368 clear x_vec y_vec
0369 case 'Klassisches RKV'
0370 load pix\stab_region_Klassisches-RKV
0371 cla(handles.region_of_stability)
0372 axes(handles.region_of_stability);
0373 plot(x_vec,y_vec,'.')
0374 set(handles.stabilitaetsbereich,'String','region of stability');
0375 set(handles.stab_button,'String','analiyse region of stability');
0376 clear x_vec y_vec
0377 case 'eigenes Verfahren'
0378 cla(handles.region_of_stability)
0379 set(handles.stab_button,'String','analiyse region of stability');
0380 end
0381
0382
0383
0384
0385
0386
0387
0388
0389 function methods_CreateFcn(hObject, eventdata, handles)
0390
0391
0392
0393
0394
0395
0396 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0397 set(hObject,'BackgroundColor','white');
0398 end
0399
0400
0401
0402 function examples_Callback(hObject, eventdata, handles)
0403
0404
0405
0406
0407
0408
0409 examples = get(handles.examples,'String');
0410 example = examples(get(handles.examples,'Value'));
0411
0412 switch char(example)
0413 case 'example 1'
0414 set(handles.equation,'String','x.^2.*exp(y)');
0415 set(handles.beginvalue,'String','-4');
0416 set(handles.endvalue,'String','4');
0417 set(handles.startvalue,'String','-5');
0418 set(handles.exakt_solution_known,'Value',1);
0419 set(handles.exakt_solution_known,'Enable','On');
0420 set(handles.u_exact,'String','-log(-(64/3)+exp(5)-1/3*x.^3)');
0421 set(handles.tolerance,'String','0.01');
0422 case 'example 2'
0423 set(handles.equation,'String','20*sin(10*x)');
0424 set(handles.beginvalue,'String','-5');
0425 set(handles.endvalue,'String','-1');
0426 set(handles.startvalue,'String','3');
0427 set(handles.exakt_solution_known,'Value',1);
0428 set(handles.exakt_solution_known,'Enable','On');
0429 set(handles.u_exact,'String','-2*cos(10*x)+3+2*cos(-50)')
0430 set(handles.tolerance,'String','0.07');
0431 case 'example 3'
0432 set(handles.equation,'String','y.*sin(x)+exp(-cos(x)).*x.^2');
0433 set(handles.beginvalue,'String','-5/2*pi');
0434 set(handles.endvalue,'String','3');
0435 set(handles.startvalue,'String','1');
0436 set(handles.exakt_solution_known,'Value',1);
0437 set(handles.exakt_solution_known,'Enable','On');
0438 set(handles.u_exact,'String','(1-1/3*(-5/2*pi)^3).*exp(-cos(x))+1/3*x.^3.*exp(-cos(x))')
0439 set(handles.tolerance,'String','0.5');
0440 case 'example 4'
0441 set(handles.equation,'String','-20.*y+20.*cos(x)');
0442 set(handles.beginvalue,'String','-5/2*pi');
0443 set(handles.endvalue,'String','-1');
0444 set(handles.startvalue,'String','1');
0445 set(handles.exakt_solution_known,'Value',1);
0446 set(handles.exakt_solution_known,'Enable','On');
0447 set(handles.u_exact,'String','(1+20/401)*exp(-50*pi)*exp(-20*x)+400/401*cos(x)+20/401*sin(x)')
0448 set(handles.tolerance,'String','0.01');
0449 case 'example 5'
0450 set(handles.equation,'String','(cos(y)).^2./sin(y).*x.*exp(1/2.*x)');
0451 set(handles.beginvalue,'String','-5');
0452 set(handles.endvalue,'String','4');
0453 set(handles.startvalue,'String','pi/2-0.2626');
0454 set(handles.exakt_solution_known,'Value',1);
0455 set(handles.exakt_solution_known,'Enable','On');
0456 set(handles.u_exact,'String','acos(1/(4*exp(1/2*x)*(1/2*x-1)+1/cos(pi/2-0.2626)*(14*exp(-5/2)*cos(pi/2-0.2626)+1)))');
0457 set(handles.tolerance,'String','0.01');
0458 case 'example 6'
0459 set(handles.equation,'String','-4*cos(6*x).*y');
0460 set(handles.beginvalue,'String','-6');
0461 set(handles.endvalue,'String','0');
0462 set(handles.startvalue,'String','-40');
0463 set(handles.exakt_solution_known,'Value',1);
0464 set(handles.exakt_solution_known,'Enable','On');
0465 set(handles.u_exact,'String','(-40/exp(-2/3*sin(-36)))*exp(-2/3*sin(6*x))');
0466 set(handles.tolerance,'String','0.5');
0467 case 'example 7'
0468 set(handles.equation,'String','-36.*exp(-36.*x)+exp(x).*(cos(exp(1.2*x))-1.2*exp(1.2*x).*sin(exp(1.2*x)))');
0469 set(handles.beginvalue,'String','-0.125');
0470 set(handles.endvalue,'String','4');
0471 set(handles.startvalue,'String','exp(4.5)+exp(-0.125)*cos(exp(-0.15))');
0472 set(handles.exakt_solution_known,'Value',1);
0473 set(handles.exakt_solution_known,'Enable','On');
0474 set(handles.u_exact,'String','exp(-36*x)+exp(x)*cos(exp(1.2*x));');
0475 set(handles.tolerance,'String','0.7');
0476 case 'own example'
0477 set(handles.equation,'String','');
0478 set(handles.beginvalue,'String','');
0479 set(handles.endvalue,'String','');
0480 set(handles.startvalue,'String','');
0481 set(handles.tolerance,'String','0.1');
0482
0483 end
0484
0485
0486
0487 function examples_CreateFcn(hObject, eventdata, handles)
0488
0489
0490
0491
0492
0493
0494 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0495 set(hObject,'BackgroundColor','white');
0496 end
0497
0498
0499
0500 function equation_Callback(hObject, eventdata, handles)
0501
0502
0503
0504
0505
0506
0507
0508
0509
0510 function equation_CreateFcn(hObject, eventdata, handles)
0511
0512
0513
0514
0515
0516
0517 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0518 set(hObject,'BackgroundColor','white');
0519 end
0520
0521
0522
0523 function beginvalue_Callback(hObject, eventdata, handles)
0524
0525
0526
0527
0528
0529
0530
0531
0532
0533 function beginvalue_CreateFcn(hObject, eventdata, handles)
0534
0535
0536
0537
0538
0539
0540 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0541 set(hObject,'BackgroundColor','white');
0542 end
0543
0544
0545
0546 function endvalue_Callback(hObject, eventdata, handles)
0547
0548
0549
0550
0551
0552
0553
0554
0555
0556 function endvalue_CreateFcn(hObject, eventdata, handles)
0557
0558
0559
0560
0561
0562
0563 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0564 set(hObject,'BackgroundColor','white');
0565 end
0566
0567
0568
0569 function startvalue_Callback(hObject, eventdata, handles)
0570
0571
0572
0573
0574
0575
0576
0577
0578
0579 function startvalue_CreateFcn(hObject, eventdata, handles)
0580
0581
0582
0583
0584
0585
0586 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0587 set(hObject,'BackgroundColor','white');
0588 end
0589
0590
0591
0592 function methods_KeyPressFcn(hObject, eventdata, handles)
0593
0594
0595
0596
0597
0598
0599
0600
0601
0602 function exakt_solution_known_Callback(hObject, eventdata, handles)
0603
0604
0605
0606 if get(handles.exakt_solution_known,'Value')
0607 set(handles.u_exact,'Enable','On');
0608 set(handles.l_inf_error,'Enable','On');
0609 set(handles.l_2_error,'Enable','On');
0610 set(handles.h_1_error,'Enable','On');
0611 set(handles.dy,'ForegroundColor','Black');
0612 set(handles.l_inf_string,'ForegroundColor','Black');
0613 set(handles.l_2_string,'ForegroundColor','Black');
0614 set(handles.h_1_string,'ForegroundColor','Black');
0615 else
0616 set(handles.u_exact,'Enable','Off')
0617 set(handles.l_inf_error,'Enable','Off');
0618 set(handles.l_2_error,'Enable','Off');
0619 set(handles.h_1_error,'Enable','Off');
0620 set(handles.dy,'ForegroundColor',[200 200 200]/255);
0621 set(handles.l_inf_string,'ForegroundColor',[200 200 200]/255);
0622 set(handles.l_2_string,'ForegroundColor',[200 200 200]/255);
0623 set(handles.h_1_string,'ForegroundColor',[200 200 200]/255);
0624 end
0625
0626
0627
0628
0629 function u_exact_Callback(hObject, eventdata, handles)
0630
0631
0632
0633
0634
0635
0636
0637
0638
0639 function u_exact_CreateFcn(hObject, eventdata, handles)
0640
0641
0642
0643
0644
0645
0646 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0647 set(hObject,'BackgroundColor','white');
0648 end
0649
0650
0651
0652 function Datei_Callback(hObject, eventdata, handles)
0653
0654
0655
0656
0657
0658
0659 function new_Callback(hObject, eventdata, handles)
0660
0661
0662
0663
0664
0665
0666 function Untitled_1_Callback(hObject, eventdata, handles)
0667
0668
0669
0670
0671
0672
0673 function info_Callback(hObject, eventdata, handles)
0674
0675
0676
0677 open('data\general informations.pdf');
0678
0679
0680
0681 function pan_Callback(hObject, eventdata, handles)
0682
0683
0684
0685 pan on;
0686
0687
0688 function zoom_Callback(hObject, eventdata, handles)
0689
0690
0691
0692 zoom on;
0693
0694
0695 function save_Callback(hObject, eventdata, handles)
0696
0697
0698
0699 global RESULT;
0700
0701
0702 f1 = figure;
0703
0704 scrsz = get(0,'ScreenSize');
0705 set(f1,'Position',0.75*scrsz);
0706 if get(handles.exakt_solution_known,'Value')
0707 plot(RESULT.gridpoints,RESULT.numerical_solution,RESULT.gridpoints,RESULT.exact_solution,'r');
0708 else
0709 plot(RESULT.gridpoints,RESULT.numerical_solution);
0710 end
0711 legend('nummersiche Lösung','exakte Lösung');
0712
0713
0714
0715 function save_CreateFcn(hObject, eventdata, handles)
0716
0717
0718
0719
0720
0721
0722 function legend_Callback(hObject, eventdata, handles)
0723
0724 if get(handles.legend,'UserData')
0725 legend (handles.solution_graphic, 'hide');
0726 set(handles.legend,'UserData',0);
0727 else
0728 legend (handles.solution_graphic, 'show');
0729 set(handles.legend,'UserData',1);
0730 end
0731
0732
0733
0734
0735
0736
0737 function stab_button_Callback(hObject, eventdata, handles)
0738 global SETTINGS RESULT
0739
0740
0741 load data\do_stab.mat
0742 load data\do_stab_old_method.mat
0743
0744 if do_stab==1 & strcmp(new_method,old_method)& SETTINGS.step_control==0
0745 region_of_stability(SETTINGS);
0746 elseif SETTINGS.step_control==1 & strcmp(new_method,old_method)
0747 size1=size(RESULT.gridpoints);
0748 size2=size(RESULT.steps);
0749 gridpoints=RESULT.gridpoints;
0750 steps=RESULT.steps;
0751
0752 if size1(2)~=size2(2)
0753 if size1<size2
0754 steps=steps(1:size1(2));
0755 else
0756 gridpoints=gridpoints(1:size2(2));
0757 end
0758 end
0759 figure
0760 plot(gridpoints,steps)
0761 else
0762 errordlg('Please start a new calculation first! ','error')
0763 end
0764
0765
0766
0767
0768
0769
0770
0771
0772
0773
0774
0775 function l_inf_error_Callback(hObject, eventdata, handles)
0776
0777
0778
0779
0780
0781
0782
0783
0784
0785 function l_inf_error_CreateFcn(hObject, eventdata, handles)
0786
0787
0788
0789
0790
0791
0792 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0793 set(hObject,'BackgroundColor','white');
0794 end
0795
0796
0797
0798 function l_2_error_Callback(hObject, eventdata, handles)
0799
0800
0801
0802
0803
0804
0805
0806
0807
0808 function l_2_error_CreateFcn(hObject, eventdata, handles)
0809
0810
0811
0812
0813
0814
0815 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0816 set(hObject,'BackgroundColor','white');
0817 end
0818
0819
0820
0821 function h_1_error_Callback(hObject, eventdata, handles)
0822
0823
0824
0825
0826
0827
0828
0829
0830
0831 function h_1_error_CreateFcn(hObject, eventdata, handles)
0832
0833
0834
0835
0836
0837
0838 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0839 set(hObject,'BackgroundColor','white');
0840 end
0841
0842
0843
0844 function step_cont_Callback(hObject, eventdata, handles)
0845
0846
0847
0848
0849
0850
0851 if get(handles.step_cont,'Value')
0852 set(handles.tolerance,'Enable','On');
0853 set(handles.etaa,'Enable','On');
0854 set(handles.tol,'ForegroundColor','Black');
0855 set(handles.eta,'ForegroundColor','Black');
0856 set(handles.stepsize,'Enable','Off');
0857 else
0858 set(handles.etaa,'Enable','Off');
0859 set(handles.tolerance,'Enable','Off');
0860 set(handles.eta,'ForegroundColor',[200 200 200]/255);
0861 set(handles.tol,'ForegroundColor',[200 200 200]/255);
0862 set(handles.stepsize,'Enable','On');
0863
0864 verfahren = get(handles.methods,'String');
0865 actual_method=verfahren(get(handles.methods,'Value'));
0866 switch actual_method{1}
0867 case 'Gauß RKV'
0868 load pix\stab_region_Gauss
0869 cla(handles.region_of_stability)
0870 axes(handles.region_of_stability);
0871 plot(x_vec,y_vec,'.')
0872 set(handles.stabilitaetsbereich,'String','region of stability');
0873 set(handles.stab_button,'String','analiyse region of stability');
0874 clear x_vec y_vec
0875 case 'Adams-Bashforth(2)'
0876 load pix\stab_region_Adams-Bashforth(2)
0877 cla(handles.region_of_stability)
0878 axes(handles.region_of_stability);
0879 plot(x_vec,y_vec,'.')
0880 set(handles.stabilitaetsbereich,'String','region of stability');
0881 set(handles.stab_button,'String','analiyse region of stability');
0882 clear x_vec y_vec
0883 case 'Adams-Moulton(2)'
0884 load pix\stab_region_Adams-Moulton(2)
0885 cla(handles.region_of_stability)
0886 axes(handles.region_of_stability);
0887 plot(x_vec,y_vec,'.')
0888 set(handles.stabilitaetsbereich,'String','region of stability');
0889 set(handles.stab_button,'String','analiyse region of stability');
0890 clear x_vec y_vec
0891 case 'Milne-Simpson(4)'
0892 load pix\stab_region_Milne-Simpson(4)
0893 cla(handles.region_of_stability)
0894 axes(handles.region_of_stability);
0895 plot(x_vec,y_vec,'.')
0896 set(handles.stabilitaetsbereich,'String','Stabilitätsgebiet des Verfahrens');
0897 set(handles.stab_button,'String','analiyse region of stability');
0898 clear x_vec y_vec
0899 case 'Dormand-Prince RKV'
0900 load pix\stab_region_'Dormand-Prince RKV'
0901 cla(handles.region_of_stability)
0902 axes(handles.region_of_stability);
0903 plot(x_vec,y_vec,'.')
0904 set(handles.stabilitaetsbereich,'String','region of stability');
0905 set(handles.stab_button,'String','analiyse region of stability');
0906 clear x_vec y_vec
0907 case 'Adams-Bashforth(4)'
0908 load pix\stab_region_'Adams-Bashforth(4)'
0909 cla(handles.region_of_stability)
0910 axes(handles.region_of_stability);
0911 plot(x_vec,y_vec,'.')
0912 set(handles.stabilitaetsbereich,'String','region of stability');
0913 set(handles.stab_button,'String','analiyse region of stability');
0914 clear x_vec y_vec
0915 case 'implicit Euler-method'
0916 load pix\stab_region_implizites-Eulerverfahren
0917 cla(handles.region_of_stability)
0918 axes(handles.region_of_stability);
0919 plot(x_vec,y_vec,'.')
0920 set(handles.stabilitaetsbereich,'String','region of stability');
0921 set(handles.stab_button,'String','analiyse region of stability');
0922 clear x_vec y_vec
0923 case 'Heun-Verfahren'
0924 load pix\stab_region_Heun-Verfahren
0925 cla(handles.region_of_stability)
0926 axes(handles.region_of_stability);
0927 plot(x_vec,y_vec,'.')
0928 set(handles.stabilitaetsbereich,'String','region of stability');
0929 set(handles.stab_button,'String','analiyse region of stability');
0930 clear x_vec y_vec
0931 case 'BDF 5'
0932 load pix\stab_region_BDF5
0933 cla(handles.region_of_stability)
0934 axes(handles.region_of_stability);
0935 plot(x_vec,y_vec,'.')
0936 set(handles.stabilitaetsbereich,'String','region of stability');
0937 set(handles.stab_button,'String','analiyse region of stability');
0938 clear x_vec y_vec
0939 case 'BDF 2'
0940 load pix\stab_region_BDF2
0941 cla(handles.region_of_stability)
0942 axes(handles.region_of_stability);
0943 plot(x_vec,y_vec,'.')
0944 set(handles.stabilitaetsbereich,'String','region of stability');
0945 set(handles.stab_button,'String','analiyse region of stability');
0946 clear x_vec y_vec
0947 case 'explicit Euler-method'
0948 load pix\stab_region_explizites-Eulerverfahren
0949 cla(handles.region_of_stability)
0950 axes(handles.region_of_stability);
0951 plot(x_vec,y_vec,'.')
0952 set(handles.stabilitaetsbereich,'String','region of stability');
0953 set(handles.stab_button,'String','analiyse region of stability');
0954 clear x_vec y_vec
0955 case 'Radau II RKV'
0956 load pix\stab_region_Radau-II-RKV
0957 cla(handles.region_of_stability)
0958 axes(handles.region_of_stability);
0959 plot(x_vec,y_vec,'.')
0960 set(handles.stabilitaetsbereich,'String','region of stability');
0961 set(handles.stab_button,'String','analiyse region of stability');
0962 clear x_vec y_vec
0963 case 'Klassisches RKV'
0964 load pix\stab_region_Klassisches-RKV
0965 cla(handles.region_of_stability)
0966 axes(handles.region_of_stability);
0967 plot(x_vec,y_vec,'.')
0968 set(handles.stabilitaetsbereich,'String','region of stability');
0969 set(handles.stab_button,'String','analiyse region of stability');
0970 clear x_vec y_vec
0971 case 'eigenes Verfahren'
0972 cla(handles.region_of_stability)
0973 set(handles.stab_button,'String','analiyse region of stability');
0974 end
0975 end
0976
0977
0978
0979
0980 function tolerance_Callback(hObject, eventdata, handles)
0981
0982
0983
0984
0985
0986
0987
0988
0989
0990 function tolerance_CreateFcn(hObject, eventdata, handles)
0991
0992
0993
0994
0995
0996
0997 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0998 set(hObject,'BackgroundColor','white');
0999 end
1000
1001
1002
1003 function etaa_Callback(hObject, eventdata, handles)
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014 function etaa_CreateFcn(hObject, eventdata, handles)
1015
1016
1017
1018
1019
1020
1021 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1022 set(hObject,'BackgroundColor','white');
1023 end
1024
1025
1026
1027 function step_cont_CreateFcn(hObject, eventdata, handles)
1028
1029
1030
1031
1032
1033
1034 function time_Callback(hObject, eventdata, handles)
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044 function time_CreateFcn(hObject, eventdata, handles)
1045
1046
1047
1048
1049
1050
1051 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1052 set(hObject,'BackgroundColor','white');
1053 end
1054
1055
1056
1057 function htmldocu_Callback(hObject, eventdata, handles)
1058
1059
1060
1061 open('doc\index.html')