Folien CE, FoC
This commit is contained in:
parent
7346b8825f
commit
e6058ffe15
Binary file not shown.
BIN
ws2011/CE/Folien/gms-07-col.pdf
Normal file
BIN
ws2011/CE/Folien/gms-07-col.pdf
Normal file
Binary file not shown.
BIN
ws2011/CE/Folien/gms-08-col.pdf
Normal file
BIN
ws2011/CE/Folien/gms-08-col.pdf
Normal file
Binary file not shown.
BIN
ws2011/CE/Uebungen/2. Programmieraufgabe/Vorlage_P2.zip
Normal file
BIN
ws2011/CE/Uebungen/2. Programmieraufgabe/Vorlage_P2.zip
Normal file
Binary file not shown.
11
ws2011/CE/Uebungen/3. Programmieraufgabe/Vorlage_P3/fixpoint.m
Executable file
11
ws2011/CE/Uebungen/3. Programmieraufgabe/Vorlage_P3/fixpoint.m
Executable file
@ -0,0 +1,11 @@
|
||||
function [N,X_itn] = fixpoint (x)
|
||||
|
||||
% Function fixpoint with relaxation matrix
|
||||
% In: Start value
|
||||
% Out: number of iteration steps, vector of solution
|
||||
|
||||
% Todo: Replace below code with fixpoint method
|
||||
N=1;
|
||||
X_itn=x;
|
||||
|
||||
|
||||
90
ws2011/CE/Uebungen/3. Programmieraufgabe/Vorlage_P3/main.m
Executable file
90
ws2011/CE/Uebungen/3. Programmieraufgabe/Vorlage_P3/main.m
Executable file
@ -0,0 +1,90 @@
|
||||
function main();
|
||||
|
||||
% Main function for iteration of static values in
|
||||
% pendulum with newton and fixed point method.
|
||||
%
|
||||
%
|
||||
% Grundlagen der Modellierung und Simulation
|
||||
% SoSe 2011
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%% Start Values %%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
x = [10; 0];
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
|
||||
x_newton = x;
|
||||
x_fixpunkt = x;
|
||||
x_qnewton = x;
|
||||
|
||||
%%%%%%%%%%%%%%%%%%% Newton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
[it_n, x_n] = newton(x_newton);
|
||||
|
||||
%%%%%%%%%%%%%%%%%%% Fixpunkt %%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
[it_f, x_f] = fixpoint(x_fixpunkt);
|
||||
|
||||
%%%%%%%%%%%%%%%%%%% Quasi-Newton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
[it_qn, x_qn] = quasi_newton(x_qnewton);
|
||||
|
||||
|
||||
%%%%%%%%%%%%%%%%%%% Output %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
disp('Startwert x');
|
||||
[x(1), x(2)]
|
||||
disp('Anzahl Iterationen bei Newton:');
|
||||
it_n
|
||||
disp('Loesung:');
|
||||
x_n(1,it_n)
|
||||
disp('Anzahl Iterationen bei Fixpunkt:');
|
||||
it_f
|
||||
disp('Loesung:');
|
||||
x_f(1,it_f)
|
||||
disp('Anzahl Iterationen bei Quasi-Newton:');
|
||||
it_qn
|
||||
disp('Loesung:');
|
||||
x_qn(1,it_qn)
|
||||
|
||||
it_ges = max(it_n,max( it_f,it_qn));
|
||||
|
||||
for i = 1:it_ges
|
||||
anzahl_ges(i) = i;
|
||||
end
|
||||
|
||||
|
||||
if(it_n < it_ges)
|
||||
for i = it_n+1:it_ges
|
||||
x_n(1,i) = x_n(1,i-1);
|
||||
x_n(2,i) = x_n(2,i-1);
|
||||
end
|
||||
end
|
||||
|
||||
if(it_f < it_ges)
|
||||
for i = it_f+1:it_ges
|
||||
x_f(1,i) = x_f(1,i-1);
|
||||
x_f(2,i) = x_f(2,i-1);
|
||||
end
|
||||
end
|
||||
if(it_qn < it_ges)
|
||||
for i = it_qn+1:it_ges
|
||||
x_qn(1,i) = x_qn(1,i-1);
|
||||
x_qn(2,i) = x_qn(2,i-1);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
plot(anzahl_ges, x_n(1,:), ...
|
||||
anzahl_ges, x_f(1,:), ...
|
||||
anzahl_ges, x_qn(1,:), ...
|
||||
anzahl_ges, x_n(2,:), ...
|
||||
anzahl_ges, x_f(2,:),...
|
||||
anzahl_ges, x_qn(2,:));
|
||||
title('Iterationsverfahren');
|
||||
legend('Theta (Newton) ','Theta (FixP)','Theta (Quasi-Newton)','Theta-Punkt (New.)','Theta-Punkt(Fixp)','Theta-Punkt(Quasi-New.)' )
|
||||
xlabel('Anzahl Iterationen');
|
||||
ylabel('Iterationsergebnisse');
|
||||
|
||||
14
ws2011/CE/Uebungen/3. Programmieraufgabe/Vorlage_P3/matrikelnummer.m
Executable file
14
ws2011/CE/Uebungen/3. Programmieraufgabe/Vorlage_P3/matrikelnummer.m
Executable file
@ -0,0 +1,14 @@
|
||||
%-----------------------------------------------------------------
|
||||
% Die nachfolgende Funktion liefert als Rückgabewert die Matrikelnummer
|
||||
% und den Namen des/der abgebenden Studenten/Studentin.
|
||||
%-----------------------------------------------------------------
|
||||
function [m, n, g] = matrikelnummer()
|
||||
% Bitte tragen Sie hier Ihre Matrikelnummer ein:
|
||||
m = 1234567;
|
||||
% Bitte tragen Sie hier Ihren Namen ein:
|
||||
n = 'Max Mustermann';
|
||||
% Bitte tragen Sie hier zusätzlich die Matrikelnummern der Gruppen-
|
||||
% mitglieder ein, mit denen Sie zusammengearbeitet haben oder lassen Sie
|
||||
% die Variable unverändert:
|
||||
g = [m,0,0];
|
||||
end
|
||||
10
ws2011/CE/Uebungen/3. Programmieraufgabe/Vorlage_P3/newton.m
Executable file
10
ws2011/CE/Uebungen/3. Programmieraufgabe/Vorlage_P3/newton.m
Executable file
@ -0,0 +1,10 @@
|
||||
function [N,X_itn] = newton(x);
|
||||
|
||||
% Function newton
|
||||
% In: Start value
|
||||
% Out: number of iteration steps, vector of solution
|
||||
|
||||
% Todo: Replace below code with newton method
|
||||
N=1;
|
||||
X_itn=x;
|
||||
|
||||
9
ws2011/CE/Uebungen/3. Programmieraufgabe/Vorlage_P3/quasi_newton.m
Executable file
9
ws2011/CE/Uebungen/3. Programmieraufgabe/Vorlage_P3/quasi_newton.m
Executable file
@ -0,0 +1,9 @@
|
||||
function [N,X_itn] = quasi_newton(x);
|
||||
|
||||
% Function quasi_newton
|
||||
% In: Start value
|
||||
% Out: number of iteration steps, vector of solution
|
||||
|
||||
% Todo: Replace below code with quasi newton method
|
||||
N=1;
|
||||
X_itn=x;
|
||||
BIN
ws2011/CE/Uebungen/loesungsvorschlag_05.pdf
Normal file
BIN
ws2011/CE/Uebungen/loesungsvorschlag_05.pdf
Normal file
Binary file not shown.
BIN
ws2011/CE/Uebungen/loesungsvorschlag_06.pdf
Normal file
BIN
ws2011/CE/Uebungen/loesungsvorschlag_06.pdf
Normal file
Binary file not shown.
BIN
ws2011/CE/Uebungen/uebung_6.pdf
Normal file
BIN
ws2011/CE/Uebungen/uebung_6.pdf
Normal file
Binary file not shown.
BIN
ws2011/CE/Uebungen/uebung_7.pdf
Normal file
BIN
ws2011/CE/Uebungen/uebung_7.pdf
Normal file
Binary file not shown.
BIN
ws2011/Compiler I/Folien/4_Block_Laufzeitumgebung.pdf
Normal file
BIN
ws2011/Compiler I/Folien/4_Block_Laufzeitumgebung.pdf
Normal file
Binary file not shown.
BIN
ws2011/FOC/Folien/Module05-Programmiersprachen1-v1.0.pdf
Normal file
BIN
ws2011/FOC/Folien/Module05-Programmiersprachen1-v1.0.pdf
Normal file
Binary file not shown.
BIN
ws2011/FOC/Folien/Module06-Programmiersprachen2-v1.0.pdf
Normal file
BIN
ws2011/FOC/Folien/Module06-Programmiersprachen2-v1.0.pdf
Normal file
Binary file not shown.
BIN
ws2011/FOC/Folien/Module07-Programmiersprachen3-v1.0.pdf
Normal file
BIN
ws2011/FOC/Folien/Module07-Programmiersprachen3-v1.0.pdf
Normal file
Binary file not shown.
BIN
ws2011/FOC/Uebungen/Loesung04-v1.0.pdf
Normal file
BIN
ws2011/FOC/Uebungen/Loesung04-v1.0.pdf
Normal file
Binary file not shown.
BIN
ws2011/FOC/Uebungen/Loesung05-v1.0.pdf
Normal file
BIN
ws2011/FOC/Uebungen/Loesung05-v1.0.pdf
Normal file
Binary file not shown.
BIN
ws2011/FOC/Uebungen/Uebung06-v1.0.pdf
Normal file
BIN
ws2011/FOC/Uebungen/Uebung06-v1.0.pdf
Normal file
Binary file not shown.
BIN
ws2011/FOC/Uebungen/Uebung07-v1.0.pdf
Normal file
BIN
ws2011/FOC/Uebungen/Uebung07-v1.0.pdf
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user