diff --git a/ws2012/CE/Folien/RepTeil1.pdf b/ws2012/CE/Folien/RepTeil1.pdf
new file mode 100644
index 00000000..f7c86dd1
Binary files /dev/null and b/ws2012/CE/Folien/RepTeil1.pdf differ
diff --git a/ws2012/CE/Folien/RepTeil2_3.3.8-3.5.pdf b/ws2012/CE/Folien/RepTeil2_3.3.8-3.5.pdf
new file mode 100644
index 00000000..bad1b9c2
Binary files /dev/null and b/ws2012/CE/Folien/RepTeil2_3.3.8-3.5.pdf differ
diff --git a/ws2012/CE/Folien/RepTeil3_3.6-5.pdf b/ws2012/CE/Folien/RepTeil3_3.6-5.pdf
new file mode 100644
index 00000000..6cd78f0f
Binary files /dev/null and b/ws2012/CE/Folien/RepTeil3_3.6-5.pdf differ
diff --git a/ws2012/CE/Folien/gms-11-NAE-col.pdf b/ws2012/CE/Folien/gms-11-NAE-col.pdf
new file mode 100644
index 00000000..764ee3e2
Binary files /dev/null and b/ws2012/CE/Folien/gms-11-NAE-col.pdf differ
diff --git a/ws2012/CE/Folien/gms-12-NAE-col.pdf b/ws2012/CE/Folien/gms-12-NAE-col.pdf
new file mode 100644
index 00000000..cc2a9ec5
Binary files /dev/null and b/ws2012/CE/Folien/gms-12-NAE-col.pdf differ
diff --git a/ws2012/CE/Klausuren/Alte CE Klausur 2008.pdf b/ws2012/CE/Klausuren/Alte CE Klausur 2008.pdf
new file mode 100644
index 00000000..a87c6d5e
Binary files /dev/null and b/ws2012/CE/Klausuren/Alte CE Klausur 2008.pdf differ
diff --git a/ws2012/CE/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 loesung_13.pdf b/ws2012/CE/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 loesung_13.pdf
new file mode 100644
index 00000000..78c02c14
Binary files /dev/null and b/ws2012/CE/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 loesung_13.pdf differ
diff --git a/ws2012/CE/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 uebung_13.pdf b/ws2012/CE/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 uebung_13.pdf
new file mode 100644
index 00000000..ee7fc05f
Binary files /dev/null and b/ws2012/CE/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 uebung_13.pdf differ
diff --git a/ws2012/CE/Klausuren/Probeklausur WS11-12/probeklausur.pdf b/ws2012/CE/Klausuren/Probeklausur WS11-12/probeklausur.pdf
new file mode 100644
index 00000000..aca13c94
Binary files /dev/null and b/ws2012/CE/Klausuren/Probeklausur WS11-12/probeklausur.pdf differ
diff --git a/ws2012/CE/Klausuren/Probeklausur WS11-12/probeklausur_mit_lsg.pdf b/ws2012/CE/Klausuren/Probeklausur WS11-12/probeklausur_mit_lsg.pdf
new file mode 100644
index 00000000..2ce947ce
Binary files /dev/null and b/ws2012/CE/Klausuren/Probeklausur WS11-12/probeklausur_mit_lsg.pdf differ
diff --git a/ws2012/CE/Klausuren/Probeklausur WS12-13/probeklausur.pdf b/ws2012/CE/Klausuren/Probeklausur WS12-13/probeklausur.pdf
new file mode 100644
index 00000000..465b2f43
Binary files /dev/null and b/ws2012/CE/Klausuren/Probeklausur WS12-13/probeklausur.pdf differ
diff --git a/ws2012/CE/Klausuren/Probeklausur WS12-13/probeklausur_lsg.pdf b/ws2012/CE/Klausuren/Probeklausur WS12-13/probeklausur_lsg.pdf
new file mode 100644
index 00000000..9dd5594c
Binary files /dev/null and b/ws2012/CE/Klausuren/Probeklausur WS12-13/probeklausur_lsg.pdf differ
diff --git a/ws2012/CE/Klausurzettel.rtf b/ws2012/CE/Klausurzettel.rtf
new file mode 100644
index 00000000..4bb0964c
--- /dev/null
+++ b/ws2012/CE/Klausurzettel.rtf
@@ -0,0 +1,22 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
+
+\f0\fs24 \cf0 \
+- Berechnen einer L\'f6sung einer DGL (allgemeine und spezielle L\'f6sung)\
+- Formeln f\'fcr Zeitcharakteristika (-> Steifheitsma\'df)\
+- Formeln f\'fcr alle m\'f6glichen Approximationsverfahren (Euler-, Runge-Kutta und co.)\
+ -> explizites / implizites Euler-Verfahren mit mehrdimensionalem System\
+ (vgl. \'dcbung 7 Aufgabe 2 d)\
+- PD-Regelung linearer System (\'fcberkritisch ged\'e4mpft, kritisch ged\'e4mpft, unterkritisch ged\'e4mpft)\
+ (vgl. \'dcbung 12 Aufgabe 2)\
+- R\'e4uber-Beute-Modell -> Probeklausur Aufgabe 3\
+- PQ-Formel / ABC-Formel\
+- Schritte einer Simulationsstudie\
+- Regeln f\'fcr die automatische Modellgenerierung\
+- unklare MC-Fragen\
+- Fragen aus Probeklausur zur Modellierung und Simulation\
+- Formel zu Pseudozufallszahlengenerator\
+- Formel zu Mittelwert und Varianz}
\ No newline at end of file
diff --git a/ws2012/CE/offene Fragen.rtf b/ws2012/CE/offene Fragen.rtf
new file mode 100644
index 00000000..34455501
--- /dev/null
+++ b/ws2012/CE/offene Fragen.rtf
@@ -0,0 +1,55 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\paperw11900\paperh16840\margl1440\margr1440\vieww11560\viewh11700\viewkind0
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
+
+\f0\b\fs24 \cf0 \'dcbungen 4 Aufgabe 1b):
+\b0 \
+ - Warum ist die erste Ruhelage stabil obwohl der Realteil von Eigenwert lambda_3/4 = 0 ist ?\
+ Es hei\'dft doch hier, dass bei Re(EW) = 0 keine Aussage \'fcber Stabilit\'e4t getroffen werden kann\'85\
+ => 3,0151i = 3 + 151i laut Wolframalpha.\
+\
+
+\b Was ist eine Referenztrajektorie?
+\b0 \
+=> Eine Referenztrajektorie gibt einen Ruhebereich in Abh\'e4ngigkeit von der Zeit t an. (z.B. eine stabile/instabile Umlaufbahn um einen Planeten). Daher ist das Einsetzen von expliziten t_s nicht notwendig (-> durch das Einsetzen von t_s erh\'e4lt man eine Ruhelage, falls die Referenztrajektorie stabil ist.) Deshalb setzt man immer die allgemeinen Referenztrajektorie ein!! Vgl. \'dcbung 4 Aufgabe 2 a)\
+\
+\
+\
+
+\b Probleklausur WS10/11:
+\b0 \
+letzte Aufgabe: Mechanik\
+\
+
+\b Probleklausur WS11/12:
+\b0 \
+Aufgabe 4c): Eigenwert f\'fcr d=0 m\'fcsste doch 0 sein und somit keine Aussage \'fcber Stabilit\'e4t m\'f6glich?\
+Aufgabe 5d): Warum kann hier nur t_2 schalten. Laut Definition kann eine Transition schalten, wenn ihre Eing\'e4nge belegt sind.\
+Aufgabe 6 c): Komische Umformung in autonomes System.\
+-> Schaltfunktion bestimmen.\
+-> Richtungsfelder zeichnen\
+\
+\
+
+\b \'dcbung 5 Aufgabe 2a)
+\b0 Addition von Gleitkommazahlen letzte Schritt "Anpassen an die Mantisse"\
+\
+
+\b \'dcbung 6 Aufgabe 2a):
+\b0 hier wird von der "einfachen Form" des Newton-Verfahren gesprochen. Was ist die komplizierte Form? Die Form mit der Matrixschreibweise? \
+\
+
+\b \'dcbung 8 Aufgabe 1c):
+\b0 Heun-Verfahren zeichnerisch L\'f6sen\
+\
+
+\b \'dcbung 12 Aufgabe 2:
+\b0 Verschiedene Schwingungstypen. Wie kommt man von den Eigenwerten auf den Schwingungstyp? PD-Regelung ?!\
+\
+\
+\
+\
+\
+}
\ No newline at end of file
diff --git a/ws2012/CE/sharedFolder/.dropbox b/ws2012/CE/sharedFolder/.dropbox
new file mode 100644
index 00000000..ffbcee8c
--- /dev/null
+++ b/ws2012/CE/sharedFolder/.dropbox
@@ -0,0 +1 @@
+232391711
diff --git a/ws2012/CE/sharedFolder/DGL_Verfahren.pdf b/ws2012/CE/sharedFolder/DGL_Verfahren.pdf
new file mode 100644
index 00000000..3e5972b4
Binary files /dev/null and b/ws2012/CE/sharedFolder/DGL_Verfahren.pdf differ
diff --git "a/ws2012/CE/sharedFolder/Icon\r" "b/ws2012/CE/sharedFolder/Icon\r"
new file mode 100644
index 00000000..e69de29b
diff --git a/ws2012/CE/sharedFolder/Klausuren/Alte CE Klausur 2008.pdf b/ws2012/CE/sharedFolder/Klausuren/Alte CE Klausur 2008.pdf
new file mode 100644
index 00000000..a87c6d5e
Binary files /dev/null and b/ws2012/CE/sharedFolder/Klausuren/Alte CE Klausur 2008.pdf differ
diff --git a/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 loesung_13.pdf b/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 loesung_13.pdf
new file mode 100644
index 00000000..78c02c14
Binary files /dev/null and b/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 loesung_13.pdf differ
diff --git a/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 uebung_13.pdf b/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 uebung_13.pdf
new file mode 100644
index 00000000..ee7fc05f
Binary files /dev/null and b/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS10-11/CE Probeklausur 2010-11 uebung_13.pdf differ
diff --git a/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS11-12/probeklausur.pdf b/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS11-12/probeklausur.pdf
new file mode 100644
index 00000000..aca13c94
Binary files /dev/null and b/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS11-12/probeklausur.pdf differ
diff --git a/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS11-12/probeklausur_mit_lsg.pdf b/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS11-12/probeklausur_mit_lsg.pdf
new file mode 100644
index 00000000..2ce947ce
Binary files /dev/null and b/ws2012/CE/sharedFolder/Klausuren/Probeklausur WS11-12/probeklausur_mit_lsg.pdf differ
diff --git a/ws2012/CE/sharedFolder/MC-Fragen.pdf b/ws2012/CE/sharedFolder/MC-Fragen.pdf
new file mode 100644
index 00000000..d8be5007
Binary files /dev/null and b/ws2012/CE/sharedFolder/MC-Fragen.pdf differ
diff --git a/ws2012/CE/sharedFolder/Zusammenfassungen/CEZusammenfassung.pdf b/ws2012/CE/sharedFolder/Zusammenfassungen/CEZusammenfassung.pdf
new file mode 100644
index 00000000..0eb9a24c
Binary files /dev/null and b/ws2012/CE/sharedFolder/Zusammenfassungen/CEZusammenfassung.pdf differ
diff --git a/ws2012/CE/sharedFolder/Zusammenfassungen/EiCE-Zusammenfassung.pdf b/ws2012/CE/sharedFolder/Zusammenfassungen/EiCE-Zusammenfassung.pdf
new file mode 100644
index 00000000..3e2f17b9
Binary files /dev/null and b/ws2012/CE/sharedFolder/Zusammenfassungen/EiCE-Zusammenfassung.pdf differ
diff --git a/ws2012/CE/sharedFolder/Zusammenfassungen/Zusammenfassung Klausur.pdf b/ws2012/CE/sharedFolder/Zusammenfassungen/Zusammenfassung Klausur.pdf
new file mode 100644
index 00000000..c41c0044
Binary files /dev/null and b/ws2012/CE/sharedFolder/Zusammenfassungen/Zusammenfassung Klausur.pdf differ
diff --git a/ws2012/CE/sharedFolder/Zusammenfassungen/ce1_klausur-vorbereitung.pdf b/ws2012/CE/sharedFolder/Zusammenfassungen/ce1_klausur-vorbereitung.pdf
new file mode 100644
index 00000000..2a85a988
Binary files /dev/null and b/ws2012/CE/sharedFolder/Zusammenfassungen/ce1_klausur-vorbereitung.pdf differ
diff --git a/ws2012/CE/uebungen/0/EiCE_Loesungsvorschlag00.pdf b/ws2012/CE/uebungen/0/EiCE_Loesungsvorschlag00.pdf
new file mode 100644
index 00000000..b2b94f5d
Binary files /dev/null and b/ws2012/CE/uebungen/0/EiCE_Loesungsvorschlag00.pdf differ
diff --git a/ws2012/CE/uebungen/1/EiCE_Loesungsvorschlag01.pdf b/ws2012/CE/uebungen/1/EiCE_Loesungsvorschlag01.pdf
new file mode 100644
index 00000000..5354381a
Binary files /dev/null and b/ws2012/CE/uebungen/1/EiCE_Loesungsvorschlag01.pdf differ
diff --git a/ws2012/CE/uebungen/10/EiCE_Loesungsvorschlag10.pdf b/ws2012/CE/uebungen/10/EiCE_Loesungsvorschlag10.pdf
new file mode 100644
index 00000000..438b0091
Binary files /dev/null and b/ws2012/CE/uebungen/10/EiCE_Loesungsvorschlag10.pdf differ
diff --git a/ws2012/CE/uebungen/10/EiCE_Uebung10.pdf b/ws2012/CE/uebungen/10/EiCE_Uebung10.pdf
new file mode 100644
index 00000000..af1280d1
Binary files /dev/null and b/ws2012/CE/uebungen/10/EiCE_Uebung10.pdf differ
diff --git a/ws2012/CE/uebungen/10/andere Gruppe/1.odt b/ws2012/CE/uebungen/10/andere Gruppe/1.odt
new file mode 100755
index 00000000..f58e8d57
Binary files /dev/null and b/ws2012/CE/uebungen/10/andere Gruppe/1.odt differ
diff --git a/ws2012/CE/uebungen/10/andere Gruppe/1b.odg b/ws2012/CE/uebungen/10/andere Gruppe/1b.odg
new file mode 100755
index 00000000..852374b2
Binary files /dev/null and b/ws2012/CE/uebungen/10/andere Gruppe/1b.odg differ
diff --git a/ws2012/CE/uebungen/10/andere Gruppe/2.odt b/ws2012/CE/uebungen/10/andere Gruppe/2.odt
new file mode 100755
index 00000000..8b7cea01
Binary files /dev/null and b/ws2012/CE/uebungen/10/andere Gruppe/2.odt differ
diff --git a/ws2012/CE/uebungen/11/EiCE_Loesungsvorschlag11.pdf b/ws2012/CE/uebungen/11/EiCE_Loesungsvorschlag11.pdf
new file mode 100644
index 00000000..3fd94bf3
Binary files /dev/null and b/ws2012/CE/uebungen/11/EiCE_Loesungsvorschlag11.pdf differ
diff --git a/ws2012/CE/uebungen/11/EiCE_Uebung11.pdf b/ws2012/CE/uebungen/11/EiCE_Uebung11.pdf
new file mode 100644
index 00000000..74147dc3
Binary files /dev/null and b/ws2012/CE/uebungen/11/EiCE_Uebung11.pdf differ
diff --git a/ws2012/CE/uebungen/11/andere Gruppe/1.jpg b/ws2012/CE/uebungen/11/andere Gruppe/1.jpg
new file mode 100755
index 00000000..070bc4ed
Binary files /dev/null and b/ws2012/CE/uebungen/11/andere Gruppe/1.jpg differ
diff --git a/ws2012/CE/uebungen/11/andere Gruppe/1_simon.odt b/ws2012/CE/uebungen/11/andere Gruppe/1_simon.odt
new file mode 100755
index 00000000..85020ced
Binary files /dev/null and b/ws2012/CE/uebungen/11/andere Gruppe/1_simon.odt differ
diff --git a/ws2012/CE/uebungen/11/andere Gruppe/2_simon.odt b/ws2012/CE/uebungen/11/andere Gruppe/2_simon.odt
new file mode 100755
index 00000000..8c8b009c
Binary files /dev/null and b/ws2012/CE/uebungen/11/andere Gruppe/2_simon.odt differ
diff --git a/ws2012/CE/uebungen/12/EiCE_Loesungsvorschlag12.pdf b/ws2012/CE/uebungen/12/EiCE_Loesungsvorschlag12.pdf
new file mode 100644
index 00000000..4d62cccb
Binary files /dev/null and b/ws2012/CE/uebungen/12/EiCE_Loesungsvorschlag12.pdf differ
diff --git a/ws2012/CE/uebungen/12/EiCE_Uebung12.pdf b/ws2012/CE/uebungen/12/EiCE_Uebung12.pdf
new file mode 100644
index 00000000..4e245967
Binary files /dev/null and b/ws2012/CE/uebungen/12/EiCE_Uebung12.pdf differ
diff --git a/ws2012/CE/uebungen/12/andere gruppe/1_simon.odt b/ws2012/CE/uebungen/12/andere gruppe/1_simon.odt
new file mode 100755
index 00000000..b189ead3
Binary files /dev/null and b/ws2012/CE/uebungen/12/andere gruppe/1_simon.odt differ
diff --git a/ws2012/CE/uebungen/12/andere gruppe/1_simon.pdf b/ws2012/CE/uebungen/12/andere gruppe/1_simon.pdf
new file mode 100755
index 00000000..38907327
Binary files /dev/null and b/ws2012/CE/uebungen/12/andere gruppe/1_simon.pdf differ
diff --git a/ws2012/CE/uebungen/12/andere gruppe/2_simon.odt b/ws2012/CE/uebungen/12/andere gruppe/2_simon.odt
new file mode 100755
index 00000000..4a9c5553
Binary files /dev/null and b/ws2012/CE/uebungen/12/andere gruppe/2_simon.odt differ
diff --git a/ws2012/CE/uebungen/12/andere gruppe/2_simon.pdf b/ws2012/CE/uebungen/12/andere gruppe/2_simon.pdf
new file mode 100755
index 00000000..4d5d366a
Binary files /dev/null and b/ws2012/CE/uebungen/12/andere gruppe/2_simon.pdf differ
diff --git a/ws2012/CE/uebungen/12/andere gruppe/Linearisierung.pdf b/ws2012/CE/uebungen/12/andere gruppe/Linearisierung.pdf
new file mode 100755
index 00000000..1d57c5a7
Binary files /dev/null and b/ws2012/CE/uebungen/12/andere gruppe/Linearisierung.pdf differ
diff --git a/ws2012/CE/uebungen/12/andere gruppe/Lösung-Jan.pdf b/ws2012/CE/uebungen/12/andere gruppe/Lösung-Jan.pdf
new file mode 100755
index 00000000..e7d35990
Binary files /dev/null and b/ws2012/CE/uebungen/12/andere gruppe/Lösung-Jan.pdf differ
diff --git a/ws2012/CE/uebungen/12/andere gruppe/Modellanalyse.pdf b/ws2012/CE/uebungen/12/andere gruppe/Modellanalyse.pdf
new file mode 100755
index 00000000..5827b1e7
Binary files /dev/null and b/ws2012/CE/uebungen/12/andere gruppe/Modellanalyse.pdf differ
diff --git a/ws2012/CE/uebungen/12/eigeneLoesung.pdf b/ws2012/CE/uebungen/12/eigeneLoesung.pdf
new file mode 100644
index 00000000..9d04233d
Binary files /dev/null and b/ws2012/CE/uebungen/12/eigeneLoesung.pdf differ
diff --git a/ws2012/CE/uebungen/2/EiCE_Loesungsvorschlag02.pdf b/ws2012/CE/uebungen/2/EiCE_Loesungsvorschlag02.pdf
new file mode 100644
index 00000000..fa756299
Binary files /dev/null and b/ws2012/CE/uebungen/2/EiCE_Loesungsvorschlag02.pdf differ
diff --git a/ws2012/CE/uebungen/2/uebung02_solution.odt b/ws2012/CE/uebungen/2/uebung02_solution.odt
deleted file mode 100644
index c526aa33..00000000
Binary files a/ws2012/CE/uebungen/2/uebung02_solution.odt and /dev/null differ
diff --git a/ws2012/CE/uebungen/2/uebung02_solution.pdf b/ws2012/CE/uebungen/2/uebung02_solution.pdf
deleted file mode 100644
index 522eeea7..00000000
Binary files a/ws2012/CE/uebungen/2/uebung02_solution.pdf and /dev/null differ
diff --git a/ws2012/CE/uebungen/3/EiCE_Loesungsvorschlag03.pdf b/ws2012/CE/uebungen/3/EiCE_Loesungsvorschlag03.pdf
new file mode 100644
index 00000000..3dcc2574
Binary files /dev/null and b/ws2012/CE/uebungen/3/EiCE_Loesungsvorschlag03.pdf differ
diff --git a/ws2012/CE/uebungen/4/EiCE_Loesungsvorschlag04.pdf b/ws2012/CE/uebungen/4/EiCE_Loesungsvorschlag04.pdf
new file mode 100644
index 00000000..030b31db
Binary files /dev/null and b/ws2012/CE/uebungen/4/EiCE_Loesungsvorschlag04.pdf differ
diff --git a/ws2012/CE/uebungen/4/Loesung/a1_1.jpg b/ws2012/CE/uebungen/4/Loesung/a1_1.jpg
new file mode 100644
index 00000000..7f7e822e
Binary files /dev/null and b/ws2012/CE/uebungen/4/Loesung/a1_1.jpg differ
diff --git a/ws2012/CE/uebungen/4/Loesung/a1_2.jpg b/ws2012/CE/uebungen/4/Loesung/a1_2.jpg
new file mode 100644
index 00000000..5c637f8b
Binary files /dev/null and b/ws2012/CE/uebungen/4/Loesung/a1_2.jpg differ
diff --git a/ws2012/CE/uebungen/4/Loesung/a2_1.jpg b/ws2012/CE/uebungen/4/Loesung/a2_1.jpg
new file mode 100644
index 00000000..20d3972e
Binary files /dev/null and b/ws2012/CE/uebungen/4/Loesung/a2_1.jpg differ
diff --git a/ws2012/CE/uebungen/4/Loesung/a2_2.jpg b/ws2012/CE/uebungen/4/Loesung/a2_2.jpg
new file mode 100644
index 00000000..69b34db9
Binary files /dev/null and b/ws2012/CE/uebungen/4/Loesung/a2_2.jpg differ
diff --git a/ws2012/CE/uebungen/5/EiCE_Loesungsvorschlag05_1.pdf b/ws2012/CE/uebungen/5/EiCE_Loesungsvorschlag05_1.pdf
new file mode 100644
index 00000000..6aae9d7d
Binary files /dev/null and b/ws2012/CE/uebungen/5/EiCE_Loesungsvorschlag05_1.pdf differ
diff --git a/ws2012/CE/uebungen/6/EiCE_Loesungsvorschlag06.pdf b/ws2012/CE/uebungen/6/EiCE_Loesungsvorschlag06.pdf
new file mode 100644
index 00000000..55ccd1ff
Binary files /dev/null and b/ws2012/CE/uebungen/6/EiCE_Loesungsvorschlag06.pdf differ
diff --git a/ws2012/CE/uebungen/8/EiCE_Loesungsvorschlag08.pdf b/ws2012/CE/uebungen/8/EiCE_Loesungsvorschlag08.pdf
new file mode 100644
index 00000000..f76c3166
Binary files /dev/null and b/ws2012/CE/uebungen/8/EiCE_Loesungsvorschlag08.pdf differ
diff --git a/ws2012/CE/uebungen/8/Einschrittverfahren_dgl-2-11.pdf b/ws2012/CE/uebungen/8/Einschrittverfahren_dgl-2-11.pdf
new file mode 100644
index 00000000..3e5972b4
Binary files /dev/null and b/ws2012/CE/uebungen/8/Einschrittverfahren_dgl-2-11.pdf differ
diff --git a/ws2012/CE/uebungen/8/andere Gruppe/CE - Uebung8.zip b/ws2012/CE/uebungen/8/andere Gruppe/CE - Uebung8.zip
new file mode 100644
index 00000000..c8d40110
Binary files /dev/null and b/ws2012/CE/uebungen/8/andere Gruppe/CE - Uebung8.zip differ
diff --git a/ws2012/CE/uebungen/8/andere Gruppe/Seite1.JPG b/ws2012/CE/uebungen/8/andere Gruppe/Seite1.JPG
new file mode 100755
index 00000000..aac9cca4
Binary files /dev/null and b/ws2012/CE/uebungen/8/andere Gruppe/Seite1.JPG differ
diff --git a/ws2012/CE/uebungen/8/andere Gruppe/Seite2.JPG b/ws2012/CE/uebungen/8/andere Gruppe/Seite2.JPG
new file mode 100755
index 00000000..179fd376
Binary files /dev/null and b/ws2012/CE/uebungen/8/andere Gruppe/Seite2.JPG differ
diff --git a/ws2012/CE/uebungen/8/andere Gruppe/Seite3.JPG b/ws2012/CE/uebungen/8/andere Gruppe/Seite3.JPG
new file mode 100755
index 00000000..ed8b2848
Binary files /dev/null and b/ws2012/CE/uebungen/8/andere Gruppe/Seite3.JPG differ
diff --git a/ws2012/CE/uebungen/8/andere Gruppe/Seite4.JPG b/ws2012/CE/uebungen/8/andere Gruppe/Seite4.JPG
new file mode 100755
index 00000000..a6e83d00
Binary files /dev/null and b/ws2012/CE/uebungen/8/andere Gruppe/Seite4.JPG differ
diff --git a/ws2012/CE/uebungen/9/EICE_Loesungsvorschlag09.pdf b/ws2012/CE/uebungen/9/EICE_Loesungsvorschlag09.pdf
new file mode 100644
index 00000000..87fb640e
Binary files /dev/null and b/ws2012/CE/uebungen/9/EICE_Loesungsvorschlag09.pdf differ
diff --git a/ws2012/CE/uebungen/9/EiCE_Uebung09.pdf b/ws2012/CE/uebungen/9/EiCE_Uebung09.pdf
new file mode 100644
index 00000000..7994a8c5
Binary files /dev/null and b/ws2012/CE/uebungen/9/EiCE_Uebung09.pdf differ
diff --git a/ws2012/CE/uebungen/9/andere gruppe/1a.odt b/ws2012/CE/uebungen/9/andere gruppe/1a.odt
new file mode 100755
index 00000000..c39873ac
Binary files /dev/null and b/ws2012/CE/uebungen/9/andere gruppe/1a.odt differ
diff --git a/ws2012/CE/uebungen/9/andere gruppe/1b.jpg b/ws2012/CE/uebungen/9/andere gruppe/1b.jpg
new file mode 100755
index 00000000..939ca217
Binary files /dev/null and b/ws2012/CE/uebungen/9/andere gruppe/1b.jpg differ
diff --git a/ws2012/CE/uebungen/9/andere gruppe/1c.txt b/ws2012/CE/uebungen/9/andere gruppe/1c.txt
new file mode 100755
index 00000000..bd7b858a
--- /dev/null
+++ b/ws2012/CE/uebungen/9/andere gruppe/1c.txt
@@ -0,0 +1,2 @@
+q1 = x-22
+q2 = x-18
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/9/andere gruppe/1d.odt b/ws2012/CE/uebungen/9/andere gruppe/1d.odt
new file mode 100755
index 00000000..8e0b514a
Binary files /dev/null and b/ws2012/CE/uebungen/9/andere gruppe/1d.odt differ
diff --git a/ws2012/CE/uebungen/9/andere gruppe/1e.odt b/ws2012/CE/uebungen/9/andere gruppe/1e.odt
new file mode 100755
index 00000000..98f164fa
Binary files /dev/null and b/ws2012/CE/uebungen/9/andere gruppe/1e.odt differ
diff --git a/ws2012/CE/uebungen/9/andere gruppe/2a.odt b/ws2012/CE/uebungen/9/andere gruppe/2a.odt
new file mode 100755
index 00000000..3672c786
Binary files /dev/null and b/ws2012/CE/uebungen/9/andere gruppe/2a.odt differ
diff --git a/ws2012/CE/uebungen/9/andere gruppe/2b.odt b/ws2012/CE/uebungen/9/andere gruppe/2b.odt
new file mode 100755
index 00000000..353e193e
Binary files /dev/null and b/ws2012/CE/uebungen/9/andere gruppe/2b.odt differ
diff --git a/ws2012/CE/uebungen/P3/.dropbox b/ws2012/CE/uebungen/P3/.dropbox
new file mode 100644
index 00000000..97fef42c
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/.dropbox
@@ -0,0 +1 @@
+207435091
diff --git a/ws2012/CE/uebungen/P3/Icon b/ws2012/CE/uebungen/P3/Icon
new file mode 100644
index 00000000..e69de29b
diff --git "a/ws2012/CE/uebungen/P3/Icon\r" "b/ws2012/CE/uebungen/P3/Icon\r"
new file mode 100644
index 00000000..e69de29b
diff --git a/ws2012/CE/uebungen/P3/P3Matlab/Grafik.pdf b/ws2012/CE/uebungen/P3/P3Matlab/Grafik.pdf
new file mode 100644
index 00000000..2b8a6329
Binary files /dev/null and b/ws2012/CE/uebungen/P3/P3Matlab/Grafik.pdf differ
diff --git a/ws2012/CE/uebungen/P3/P3Matlab/fixpoint.m b/ws2012/CE/uebungen/P3/P3Matlab/fixpoint.m
new file mode 100644
index 00000000..1be67d26
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Matlab/fixpoint.m
@@ -0,0 +1,36 @@
+function [N,x] = fixpoint (x0)
+% Function fixpoint
+% In: Start value
+% Out: number of iteration steps, vector of solution
+N=1;
+xCur = x0;
+xOld = x0;
+epsilon = 10^(-8);
+A = [3,4;1,6];
+
+function [y] = f(x)
+ yTemp = (A - x(3)*eye(2))*[x(1);x(2)];
+ lambda = x(1)^2+x(2)^2-1;
+ y = [ yTemp ; lambda];
+end
+
+function [y] = jacobi(x)
+ y1 = [A(1,1)-x(3) , A(1,2) , -x(1)];
+ y2 = [A(2,1) , A(2,2)-x(3) , -x(2)];
+ y3 = [2*x(1) , 2*x(2) , 0];
+ y = [y1;y2;y3];
+end
+
+function [y] = fixpoint_next(x)
+ y = x - inv(jacobi(x0)) * f(x);
+end
+
+xCur = fixpoint_next(xOld);
+x(:,N) = xCur;
+while(norm(xCur-xOld) > epsilon && N < 60)
+ N = N + 1;
+ xOld = xCur;
+ xCur = fixpoint_next(xOld);
+ x(:,N) = xCur;
+end
+end
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P3/P3Matlab/main.m b/ws2012/CE/uebungen/P3/P3Matlab/main.m
new file mode 100644
index 00000000..4d06ee06
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Matlab/main.m
@@ -0,0 +1,63 @@
+function main();
+
+% Main function for iteration of static values in
+% eigenvalue problem
+%
+%
+% Grundlagen der Modellierung und Simulation
+% WiSe 2012/13
+
+
+%%%%%%%%%%%%%%%%%%%%%% Start Values %%%%%%%%%%%%%%%%%%%%
+
+x = [-3; 0; 0]
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+x_fixpunkt = x;
+x_newton = x;
+x_qnewton = x;
+
+%%%%%%%%%%%%%%%%%%% Fixpunkt %%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+[it_f, x_f] = fixpoint(x_fixpunkt);
+
+%%%%%%%%%%%%%%%%%%% Newton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+[it_n, x_n] = newton(x_newton);
+
+%%%%%%%%%%%%%%%%%%% Quasi-Newton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+[it_qn, x_qn] = quasi_newton(x_qnewton);
+
+
+%%%%%%%%%%%%%%%%%%% Output %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+disp('Startwert x');
+x
+
+disp('Anzahl Iterationen bei Fixpunkt:');
+it_f
+disp('Loesung:');
+x_f(:,it_f)
+%x_f
+
+disp('Anzahl Iterationen bei Newton:');
+it_n
+disp('Loesung:');
+x_n(:,it_n)
+%x_n
+disp('Anzahl Iterationen bei Quasi-Newton:');
+it_qn
+disp('Loesung:');
+x_qn(:,it_qn)
+
+
+semilogy(1:it_n, abs(x_n(3,:)-2), ...
+ 1:it_f, abs(x_f(3,:)-2), ...
+ 1:it_qn, abs(x_qn(3,:)-2))
+title('Iterationsverfahren');
+legend('error (Newton) ','error (FixP)','error (Quasi-Newton)')
+xlabel('Anzahl Iterationen');
+ylabel('Fehler in lambda');
+
diff --git a/ws2012/CE/uebungen/P3/P3Matlab/myeigen.m b/ws2012/CE/uebungen/P3/P3Matlab/myeigen.m
new file mode 100644
index 00000000..5d9e9c2b
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Matlab/myeigen.m
@@ -0,0 +1,10 @@
+function [out] = fmyeigen(x)
+% Defines a function which has eigenvector/eigenvalue as roots
+% x(1) : first component of eigenvector
+% x(2) : second component of eigenvector
+% x(3) : eigenvalue
+
+out=[(3-x(3))*x(1)+4*x(2); x(1)+(6-x(3))*x(2); x(1)*x(1)+x(2)*x(2)-1];
+
+end
+
diff --git a/ws2012/CE/uebungen/P3/P3Matlab/newton.m b/ws2012/CE/uebungen/P3/P3Matlab/newton.m
new file mode 100644
index 00000000..46d4aa0b
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Matlab/newton.m
@@ -0,0 +1,36 @@
+function [N, x] = newton(x0)
+% Function newton
+% In: Start value
+% Out: number of iteration steps, vector of solution
+N=1;
+xOld = x0;
+xCur = x0;
+epsilon = 10^(-8);
+A = [3,4;1,6];
+
+function [y] = f(x)
+ yTemp = (A - x(3)*eye(2))*[x(1);x(2)];
+ lambda = x(1)^2+x(2)^2-1;
+ y = [ yTemp ; lambda];
+end
+
+function [y] = jacobi(x)
+ y1 = [A(1,1)-x(3) , A(1,2) , -x(1)];
+ y2 = [A(2,1) , A(2,2)-x(3) , -x(2)];
+ y3 = [2*x(1) , 2*x(2) , 0];
+ y = [y1;y2;y3];
+end
+
+function [y] = newton_next(x)
+ y = x - jacobi(x)\f(x);
+end
+
+xCur = newton_next(xOld);
+x(:,N) = xCur;
+while(norm(xCur-xOld) > epsilon && N < 60)
+ N = N + 1;
+ xOld = xCur;
+ xCur = newton_next(xOld);
+ x(:,N) = xCur;
+end
+end
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P3/P3Matlab/quasi_newton.m b/ws2012/CE/uebungen/P3/P3Matlab/quasi_newton.m
new file mode 100644
index 00000000..7016a7a4
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Matlab/quasi_newton.m
@@ -0,0 +1,48 @@
+function [N,x] = quasi_newton(x0)
+% Function quasi_newton
+% In: Start value
+% Out: number of iteration steps, vector of solution
+N=1;
+xCur = x0;
+xOld = x0;
+epsilon = 10^(-8);
+A = [3,4;1,6];
+
+function [y] = f(x)
+ yTemp = (A - x(3)*eye(2))*[x(1);x(2)];
+ lambda = x(1)^2+x(2)^2 - 1;
+ y = [ yTemp ; lambda];
+end
+
+function [y] = jacobi(x)
+ y1 = [A(1,1)-x(3) , A(1,2) , -x(1)];
+ y2 = [A(2,1) , A(2,2)-x(3) , -x(2)];
+ y3 = [2*x(1) , 2*x(2) , 0];
+ y = [y1;y2;y3];
+end
+
+function [y] = newton_next(x)
+ y = x + getDeltaX(x);
+end
+
+function [y] = getDeltaX(x)
+ y = jac\(-f(x));
+end
+
+jac = jacobi(x0);
+xCur = newton_next(xOld);
+x(:,N) = xCur;
+while(abs(norm(xCur)-norm(xOld)) > epsilon && N < 60)
+ N = N + 1;
+ xOld = xCur;
+ % anpassen der angenäherten jacobi matrix
+ % ---------------------------------------
+ % Schritt 1 - delta X ausrechnen
+ delta = getDeltaX(xOld);
+ % Schritt 2 - x^k ausrechnen
+ xCur = newton_next(xOld);
+ % Schritt 3 & 4 - f(x^k) = f(xCur) und anpassen der Jacobi Matrix
+ jac = jac + (1/norm(delta)^2)*(f(xCur) - f(xOld) - jac*delta) * delta';
+ x(:,N) = xCur;
+end
+end
diff --git a/ws2012/CE/uebungen/P3/P3Matlab/results.txt b/ws2012/CE/uebungen/P3/P3Matlab/results.txt
new file mode 100644
index 00000000..8a2d1a44
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Matlab/results.txt
@@ -0,0 +1,71 @@
+Gruppe:
+ - Michael Scholz (Matr.# 1576630)
+ - David Kaufmann (Matr.# 1481864)
+ - Dennis Werner (Matr.# 1513509)
+
+
+Ausgabe der main-Funktion in Matlab:
+
+
+1. Aufruf von main liefert:
+==============================
+
+>> main
+
+x =
+
+ -3
+ 0
+ 0
+
+Startwert x
+
+x =
+
+ -3
+ 0
+ 0
+
+Anzahl Iterationen bei Fixpunkt:
+
+it_f =
+
+ 47
+
+Loesung:
+
+ans =
+
+ -0.9701
+ 0.2425
+ 2.0000
+
+Anzahl Iterationen bei Newton:
+
+it_n =
+
+ 6
+
+Loesung:
+
+ans =
+
+ -0.9701
+ 0.2425
+ 2.0000
+
+Anzahl Iterationen bei Quasi-Newton:
+
+it_qn =
+
+ 14
+
+Loesung:
+
+ans =
+
+ -0.9701
+ 0.2425
+ 2.0000
+
+>>
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/Dave/fixpoint.sc b/ws2012/CE/uebungen/P3/P3Scilab/Dave/fixpoint.sc
new file mode 100644
index 00000000..dcd82023
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/Dave/fixpoint.sc
@@ -0,0 +1,37 @@
+function [N,x] = fixpoint (x0)
+// Function fixpoint
+// In: Start value
+// Out: number of iteration steps, vector of solution
+N=1;
+xCur = x0;
+xOld = x0;
+epsilon = 10^(-8);
+A = [3,4;1,6];
+
+function [y] = f(x)
+ // eye(A) muss in matlab durch eye(2) ersetzt werden
+ yTemp = (A - x(3)*eye(A))*[x(1);x(2)];
+ lambda = x(1)^2+x(2)^2-1;
+ y = [ yTemp ; lambda];
+endfunction
+
+function [y] = jacobi(x)
+ y1 = [A(1,1)-x(3) , A(1,2) , -x(1)];
+ y2 = [A(2,1) , A(2,2)-x(3) , -x(2)];
+ y3 = [2*x(1) , 2*x(2) , 0];
+ y = [y1;y2;y3];
+endfunction
+
+function [y] = fixpoint_next(x)
+ y = x - inv(jacobi(x0)) * f(x);
+endfunction
+
+xCur = fixpoint_next(xOld);
+x(:,N) = xCur;
+while(abs(norm(xCur)-norm(xOld)) > epsilon & N < 60)
+ N = N + 1;
+ xOld = xCur;
+ xCur = fixpoint_next(xOld);
+ x(:,N) = xCur;
+end
+endfunction
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/Dave/main.sc b/ws2012/CE/uebungen/P3/P3Scilab/Dave/main.sc
new file mode 100755
index 00000000..4d463e82
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/Dave/main.sc
@@ -0,0 +1,65 @@
+function main();
+
+// Main function for iteration of static values in
+// eigenvalue problem
+//
+//
+// Grundlagen der Modellierung und Simulation
+// WiSe 2012/13
+
+
+//%%%%%%%%%%%%%%%%%%%%%% Start Values %%%%%%%%%%%%%%%%%%%%
+
+x = [-3; 0; 0]
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+x_fixpunkt = x;
+x_newton = x;
+x_qnewton = x;
+
+//%%%%%%%%%%%%%%%%%%% Fixpunkt %%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+[it_f, x_f] = fixpoint(x_fixpunkt);
+
+//%%%%%%%%%%%%%%%%%%% Newton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+[it_n, x_n] = newton(x_newton);
+
+//%%%%%%%%%%%%%%%%%%% Quasi-Newton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+[it_qn, x_qn] = quasi_newton(x_qnewton);
+
+
+//%%%%%%%%%%%%%%%%%%% Output %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+disp('Startwert x');
+x
+
+disp('Anzahl Iterationen bei Fixpunkt:');
+it_f
+disp('Loesung:');
+x_f(:,it_f)
+%x_f
+
+disp('Anzahl Iterationen bei Newton:');
+it_n
+disp('Loesung:');
+x_n(:,it_n)
+%x_n
+disp('Anzahl Iterationen bei Quasi-Newton:');
+it_qn
+disp('Loesung:');
+x_qn(:,it_qn)
+
+
+semilogy(1:it_n, abs(x_n(3,:)-2), ...
+ 1:it_f, abs(x_f(3,:)-2), ...
+ 1:it_qn, abs(x_qn(3,:)-2))
+title('Iterationsverfahren');
+legend('error (Newton) ','error (FixP)','error (Quasi-Newton)')
+xlabel('Anzahl Iterationen');
+ylabel('Fehler in lambda');
+
+endfunction
+
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/Dave/myeigen.sc b/ws2012/CE/uebungen/P3/P3Scilab/Dave/myeigen.sc
new file mode 100755
index 00000000..f07f3e29
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/Dave/myeigen.sc
@@ -0,0 +1,10 @@
+function [out] = fmyeigen(x)
+// Defines a function which has eigenvector/eigenvalue as roots
+// x(1) : first component of eigenvector
+// x(2) : second component of eigenvector
+// x(3) : eigenvalue
+
+out=[(3-x(3))*x(1)+4*x(2); x(1)+(6-x(3))*x(2); x(1)*x(1)+x(2)*x(2)-1];
+
+endfunction
+
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/Dave/newton.sc b/ws2012/CE/uebungen/P3/P3Scilab/Dave/newton.sc
new file mode 100644
index 00000000..35576f6a
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/Dave/newton.sc
@@ -0,0 +1,37 @@
+function [N, x] = newton(x0)
+// Function newton
+// In: Start value
+// Out: number of iteration steps, vector of solution
+N=1;
+xOld = x0;
+xCur = x0;
+epsilon = 10^(-8);
+A = [3,4;1,6];
+
+function [y] = f(x)
+ // eye(A) muss in matlab durch eye(2) ersetzt werden
+ yTemp = (A - x(3)*eye(A))*[x(1);x(2)];
+ lambda = x(1)^2+x(2)^2-1;
+ y = [ yTemp ; lambda];
+endfunction
+
+function [y] = jacobi(x)
+ y1 = [A(1,1)-x(3) , A(1,2) , -x(1)];
+ y2 = [A(2,1) , A(2,2)-x(3) , -x(2)];
+ y3 = [2*x(1) , 2*x(2) , 0];
+ y = [y1;y2;y3];
+endfunction
+
+function [y] = newton_next(x)
+ y = x - jacobi(x)\f(x);
+endfunction
+
+xCur = newton_next(xOld);
+x(:,N) = xCur;
+while(abs(norm(xCur)-norm(xOld)) > epsilon & N < 60)
+ N = N + 1;
+ xOld = xCur;
+ xCur = newton_next(xOld);
+ x(:,N) = xCur;
+end
+endfunction
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/Dave/quasi_newton.sc b/ws2012/CE/uebungen/P3/P3Scilab/Dave/quasi_newton.sc
new file mode 100644
index 00000000..5ba4ba35
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/Dave/quasi_newton.sc
@@ -0,0 +1,46 @@
+function [N, x] = quasi_newton(x0);
+// Function quasi_newton
+// In: Start value
+// Out: number of iteration steps, vector of solution
+N=1;
+xCur = x0;
+xOld = x0;
+epsilon = 10^(-8);
+A = [3,4;1,6];
+
+function [y] = f(x)
+ // eye(A) muss in matlab durch eye(2) ersetzt werden
+ yTemp = (A - x(3)*eye(A))*[x(1);x(2)];
+ lambda = x(1)^2+x(2)^2 - 1;
+ y = [ yTemp ; lambda];
+endfunction
+
+function [y] = jacobi(x)
+ y1 = [A(1,1)-x(3) , A(1,2) , -x(1)];
+ y2 = [A(2,1) , A(2,2)-x(3) , -x(2)];
+ y3 = [2*x(1) , 2*x(2) , 0];
+ y = [y1;y2;y3];
+endfunction
+
+function [y] = newton_next(x)
+ y = x + getDeltaX(x);
+endfunction
+
+function [y] = getDeltaX(x)
+ y = jac\(-f(x));
+endfunction
+
+jac = jacobi(x0);
+xCur = newton_next(xOld);
+x(:,N) = xCur;
+while(abs(norm(xCur)-norm(xOld)) > epsilon & N < 60)
+ N = N + 1;
+ xOld = xCur;
+ // anpassen der angenäherten jacobi matrix
+ delta = getDeltaX(xOld); //schritt 1
+ xCur = newton_next(xOld); //schritt 2
+ //delta'*delta in matlab evtll durch norm(delta,2) austauschen
+ jac = jac + (1/(delta'*delta))*(f(xCur) - f(xOld) - jac*delta) * delta'; //schritt 4
+ x(:,N) = xCur;
+end
+endfunction
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/Dave/results.txt b/ws2012/CE/uebungen/P3/P3Scilab/Dave/results.txt
new file mode 100644
index 00000000..53e15aaa
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/Dave/results.txt
@@ -0,0 +1,59 @@
+-->[N, X] = newton([-3;0;0])
+ X =
+
+ - 1.6666667 - 1.1121653 - 0.9790265 - 0.9701824 - 0.9701425 - 0.9701425
+ 0.2777778 0.265897 0.2443321 0.2425437 0.2425356 0.2425356
+ 1.2962963 1.7950236 1.976989 1.9998 2. 2.
+ N =
+
+ 6.
+
+
+-->[N, X] = fixpoint([-3;0;0])
+ X =
+
+
+ column 1 to 7
+
+ - 1.6666667 - 1.3575103 - 1.2033799 - 1.1161244 - 1.0636206 - 1.0308881 - 1.0100171
+ 0.2777778 0.2862654 0.2746085 0.2632281 0.2551597 0.2499909 0.2468379
+ 1.2962963 1.5519547 1.6869252 1.7754082 1.8382905 1.8841094 1.917574
+
+ column 8 to 14
+
+ - 0.9965065 - 0.9876671 - 0.9818386 - 0.9779729 - 0.9753975 - 0.9736757 - 0.9725214
+ 0.2449727 0.2438948 0.2432839 0.2429434 0.2427563 0.2426548 0.2426001
+ 1.941856 1.9593059 1.9717187 1.980464 1.986573 1.9908095 1.9937297
+
+ column 15 to 21
+
+ - 0.9717459 - 0.9712241 - 0.9708726 - 0.9706355 - 0.9704755 - 0.9703675 - 0.9702945
+ 0.2425708 0.2425551 0.2425466 0.2425420 0.2425394 0.2425379 0.2425371
+ 1.995733 1.9971018 1.9980344 1.9986683 1.9990984 1.99939 1.9995874
+
+ column 22 to 28
+
+ - 0.9702453 - 0.9702119 - 0.9701894 - 0.9701742 - 0.9701639 - 0.970157 - 0.9701523
+ 0.2425366 0.2425362 0.2425360 0.2425359 0.2425358 0.2425357 0.2425357
+ 1.999721 1.9998114 1.9998725 1.9999138 1.9999417 1.9999606 1.9999734
+
+ column 29 to 35
+
+ - 0.9701491 - 0.9701470 - 0.9701455 - 0.9701445 - 0.9701439 - 0.9701434 - 0.9701431
+ 0.2425357 0.2425357 0.2425357 0.2425356 0.2425356 0.2425356 0.2425356
+ 1.999982 1.9999878 1.9999918 1.9999944 1.9999962 1.9999975 1.9999983
+
+ column 36 to 42
+
+ - 0.9701429 - 0.9701428 - 0.9701427 - 0.9701426 - 0.9701426 - 0.9701426 - 0.9701425
+ 0.2425356 0.2425356 0.2425356 0.2425356 0.2425356 0.2425356 0.2425356
+ 1.9999988 1.9999992 1.9999995 1.9999996 1.9999998 1.9999998 1.9999999
+
+ column 43 to 46
+
+ - 0.9701425 - 0.9701425 - 0.9701425 - 0.9701425
+ 0.2425356 0.2425356 0.2425356 0.2425356
+ 1.9999999 1.9999999 2. 2.
+ N =
+
+ 46.
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/fixpoint.sc b/ws2012/CE/uebungen/P3/P3Scilab/fixpoint.sc
new file mode 100755
index 00000000..efe99e87
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/fixpoint.sc
@@ -0,0 +1,37 @@
+function [N,x] = fixpoint (x0)
+// Function fixpoint
+// In: Start value
+// Out: number of iteration steps, vector of solution
+N=1;
+xCur = x0;
+xOld = x0;
+epsilon = 10^(-8);
+A = [3,4;1,6];
+
+function [y] = f(x)
+ // eye(A) muss in matlab durch eye(2) ersetzt werden
+ yTemp = (A - x(3)*eye(A))*[x(1);x(2)];
+ lambda = x(1)^2+x(2)^2-1;
+ y = [ yTemp ; lambda];
+endfunction
+
+function [y] = jacobi(x)
+ y1 = [A(1,1)-x(3) , A(1,2) , -x(1)];
+ y2 = [A(2,1) , A(2,2)-x(3) , -x(2)];
+ y3 = [2*x(1) , 2*x(2) , 0];
+ y = [y1;y2;y3];
+endfunction
+
+function [y] = fixpoint_next(x)
+ y = x - inv(jacobi(x0)) * f(x);
+endfunction
+
+xCur = fixpoint_next(xOld);
+x(:,N) = xCur;
+while(norm(xCur-xOld) > epsilon & N < 60)
+ N = N + 1;
+ xOld = xCur;
+ xCur = fixpoint_next(xOld);
+ x(:,N) = xCur;
+end
+endfunction
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/main.sc b/ws2012/CE/uebungen/P3/P3Scilab/main.sc
new file mode 100755
index 00000000..4d463e82
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/main.sc
@@ -0,0 +1,65 @@
+function main();
+
+// Main function for iteration of static values in
+// eigenvalue problem
+//
+//
+// Grundlagen der Modellierung und Simulation
+// WiSe 2012/13
+
+
+//%%%%%%%%%%%%%%%%%%%%%% Start Values %%%%%%%%%%%%%%%%%%%%
+
+x = [-3; 0; 0]
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+x_fixpunkt = x;
+x_newton = x;
+x_qnewton = x;
+
+//%%%%%%%%%%%%%%%%%%% Fixpunkt %%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+[it_f, x_f] = fixpoint(x_fixpunkt);
+
+//%%%%%%%%%%%%%%%%%%% Newton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+[it_n, x_n] = newton(x_newton);
+
+//%%%%%%%%%%%%%%%%%%% Quasi-Newton %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+[it_qn, x_qn] = quasi_newton(x_qnewton);
+
+
+//%%%%%%%%%%%%%%%%%%% Output %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+disp('Startwert x');
+x
+
+disp('Anzahl Iterationen bei Fixpunkt:');
+it_f
+disp('Loesung:');
+x_f(:,it_f)
+%x_f
+
+disp('Anzahl Iterationen bei Newton:');
+it_n
+disp('Loesung:');
+x_n(:,it_n)
+%x_n
+disp('Anzahl Iterationen bei Quasi-Newton:');
+it_qn
+disp('Loesung:');
+x_qn(:,it_qn)
+
+
+semilogy(1:it_n, abs(x_n(3,:)-2), ...
+ 1:it_f, abs(x_f(3,:)-2), ...
+ 1:it_qn, abs(x_qn(3,:)-2))
+title('Iterationsverfahren');
+legend('error (Newton) ','error (FixP)','error (Quasi-Newton)')
+xlabel('Anzahl Iterationen');
+ylabel('Fehler in lambda');
+
+endfunction
+
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/myeigen.sc b/ws2012/CE/uebungen/P3/P3Scilab/myeigen.sc
new file mode 100755
index 00000000..f07f3e29
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/myeigen.sc
@@ -0,0 +1,10 @@
+function [out] = fmyeigen(x)
+// Defines a function which has eigenvector/eigenvalue as roots
+// x(1) : first component of eigenvector
+// x(2) : second component of eigenvector
+// x(3) : eigenvalue
+
+out=[(3-x(3))*x(1)+4*x(2); x(1)+(6-x(3))*x(2); x(1)*x(1)+x(2)*x(2)-1];
+
+endfunction
+
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/newton.sc b/ws2012/CE/uebungen/P3/P3Scilab/newton.sc
new file mode 100755
index 00000000..09ff966d
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/newton.sc
@@ -0,0 +1,46 @@
+function [N, matrixX] = newton(x0)
+
+// Function newton
+// In: Start value
+// Out: number of iteration steps, vector of solution
+
+// Todo: Replace below code with Newton method
+
+
+bool=1;
+N=1;
+x=x0;
+xTmp = x0;
+e = 10^(-8);
+matrixX = []; //matrix we use for iterations
+matrixA = [3 4;1 6];
+
+//define function f(x) as vectorfunction:
+function [y] = f(x)
+ y = [(matrixA(1,1)-x(3))*x(1) + matrixA(1,2)*x(2) ;
+ matrixA(2,1)*x(1) + (matrixA(2,2)-x(3))*x(2) ;
+ (x(1)^2-1) + (x(2)^2 -1)];
+endfunction
+
+
+while(bool == 1)
+ //calculate x (of current iteration)
+ jac = numdiff(f, x); //jacobi-matrix
+ deltaX = jac\(-f(x));
+ x = x + deltaX;
+
+ //add x to output matrix
+ matrixX(:,N) = x;
+
+ //check criteria
+ if(N == 60 | (abs(norm(xTmp)-norm(x)) < e & N >1))
+ bool = 0; //-> will cancel the while-loop
+ end
+
+ N = N+1; //increase N
+ xTmp = x;
+
+end
+
+N = N-1;
+endfunction
diff --git a/ws2012/CE/uebungen/P3/P3Scilab/quasi_newton.sc b/ws2012/CE/uebungen/P3/P3Scilab/quasi_newton.sc
new file mode 100755
index 00000000..d63fdfc9
--- /dev/null
+++ b/ws2012/CE/uebungen/P3/P3Scilab/quasi_newton.sc
@@ -0,0 +1,56 @@
+function [N, matrixX] = quasi_newton(x0);
+
+// Function quasi_newton
+// In: Start value
+// Out: number of iteration steps, vector of solution
+
+// Todo: Replace below code with quasi-Newton method
+
+
+bool=1;
+N=1;
+x=x0;
+xTmp = x0;
+e = 10^(-8);
+matrixX = []; //matrix we use for iterations
+matrixA = [3 4;1 6];
+a = 1;
+
+
+//define function f(x) as vectorfunction:
+function [y] = f(x)
+ y = [(matrixA(1,1)-x(3))*x(1) + matrixA(1,2)*x(2) ;
+ matrixA(2,1)*x(1) + (matrixA(2,2)-x(3))*x(2) ;
+ (x(1)^2) + (x(2)^2) - 1];
+endfunction
+
+
+jac = numdiff(f, x); //jacobi-matrix
+
+
+while(bool == 1)
+ //calculate x (of current iteration)
+
+ deltaX = jac\(-f(x));
+ x = x + deltaX;
+
+ //add x to output matrix
+ matrixX(:,N) = x;
+
+ //calculate jacobi-matrix for next iteration
+ deltaF = f(x) - f(x-deltaX);
+ incr = 1 / (norm(deltaX)^2)*(deltaF-jac*a*deltaX)*(a.*deltaX)';
+ jac = jac + incr;
+
+ //check criteria
+ if(N == 30 | (abs(norm(xTmp)-norm(x)) < e & N >1))
+ bool = 0; //-> will cancel the while-loop
+ end
+
+ N = N+1; //increase N
+ xTmp = x;
+
+end
+
+N = N-1;
+endfunction
diff --git a/ws2012/CE/uebungen/P3/loesung_7.pdf b/ws2012/CE/uebungen/P3/loesung_7.pdf
new file mode 100644
index 00000000..4079462c
Binary files /dev/null and b/ws2012/CE/uebungen/P3/loesung_7.pdf differ
diff --git a/ws2012/CE/uebungen/P4/.dropbox b/ws2012/CE/uebungen/P4/.dropbox
new file mode 100644
index 00000000..525dac35
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/.dropbox
@@ -0,0 +1 @@
+219911329
diff --git a/ws2012/CE/uebungen/P4/DK64_DW09_MS30.zip b/ws2012/CE/uebungen/P4/DK64_DW09_MS30.zip
new file mode 100644
index 00000000..f06a69fc
Binary files /dev/null and b/ws2012/CE/uebungen/P4/DK64_DW09_MS30.zip differ
diff --git a/ws2012/CE/uebungen/P4/DP13_SB49/diffplot.m b/ws2012/CE/uebungen/P4/DP13_SB49/diffplot.m
new file mode 100644
index 00000000..d9b4b263
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/DP13_SB49/diffplot.m
@@ -0,0 +1,38 @@
+function diffplot(fun, jac, x)
+%
+%
+% [f, J] = diffplot(fun, jac, x) plots difference between symbolic
+% differentiation and approximation by finite differences
+%
+% INPUT
+% fun function handle; fun: R^n -> R^n
+% jac function handle; jac: R^n -> R^(mxn)
+% x point x in R^n to evaluate f and jacobian
+%
+
+ % testrahmen
+ min = 0;
+ max = 18;
+ len = max-min+1;
+
+ % initialisierungen
+ indices = zeros(len,1);
+ values = zeros(len,1);
+
+ for i=min:max
+ % speichert i für die darstellung im graphen
+ indices(i-min+1)=i;
+ % schrittweitenvektor 10^-i berechnen
+ delta = 10^(-i) * ones(size(x,1));
+ % numerische ableitung berechnen
+ [~,df] = numdiff(fun,x,delta);
+ % genormte differenz speichern
+ values(i-min+1) = abs(df-jac(x));
+ end
+
+ % ausgabe
+ plot(indices,values);
+ xlabel('i (Mit delta = 10^-i)');
+ ylabel('Differenz');
+
+end % function diffplot
diff --git a/ws2012/CE/uebungen/P4/DP13_SB49/myfuncA.m b/ws2012/CE/uebungen/P4/DP13_SB49/myfuncA.m
new file mode 100644
index 00000000..e9896781
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/DP13_SB49/myfuncA.m
@@ -0,0 +1,11 @@
+function f = myfuncA(in1)
+%MYFUNCA
+% F = MYFUNCA(IN1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:42:28
+
+x1 = in1(1,:);
+x2 = in1(2,:);
+x3 = in1(3,:);
+f = [x1.^2;x2+x3;x3.*3.0];
diff --git a/ws2012/CE/uebungen/P4/DP13_SB49/myfuncB.m b/ws2012/CE/uebungen/P4/DP13_SB49/myfuncB.m
new file mode 100644
index 00000000..39b35a11
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/DP13_SB49/myfuncB.m
@@ -0,0 +1,8 @@
+function f = myfuncB(x1)
+%MYFUNCB
+% F = MYFUNCB(X1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:41:51
+
+f = x1.^2;
diff --git a/ws2012/CE/uebungen/P4/DP13_SB49/myjacB.m b/ws2012/CE/uebungen/P4/DP13_SB49/myjacB.m
new file mode 100644
index 00000000..87d93866
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/DP13_SB49/myjacB.m
@@ -0,0 +1,8 @@
+function jac = myjacB(x1)
+%MYJACB
+% JAC = MYJACB(X1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:41:51
+
+jac = reshape([x1.*2.0],[1, 1]);
diff --git a/ws2012/CE/uebungen/P4/DP13_SB49/numdiff.m b/ws2012/CE/uebungen/P4/DP13_SB49/numdiff.m
new file mode 100644
index 00000000..b4bb5355
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/DP13_SB49/numdiff.m
@@ -0,0 +1,34 @@
+function [f, J] = numdiff(fun,x,delta)
+%
+%
+% [f, J] = numdiff(fun,x,delta) computes jacobian with difference quotient
+%
+% INPUT
+% fun function handle
+% x point x to evaluate f and approximate jacobian
+% delta stepsize for difference approximation
+% OUTPUT
+% f value f(x)
+% J jacobian at x
+%
+ % funktionswert bestimmen
+ f=fun(x);
+
+ % jakobimatrix mit nullen initialisieren
+ J=zeros(size(f,1),size(x,1));
+ for i=1:size(f)
+ for j=1:size(x)
+ % schrittweite dieses parameters zwischenspeichern
+ dj = delta(j);
+ % d = d(j)*e(j)
+ d = zeros(size(delta));
+ d(j) = dj;
+ % differenz ermitteln
+ df = (fun(x+d)-fun(x));
+ % relative differenz berechnen
+ J(i,j)=df(i)/dj;
+ end
+ end
+
+end % function numdiff
+
diff --git a/ws2012/CE/uebungen/P4/DP13_SB49/testA.m b/ws2012/CE/uebungen/P4/DP13_SB49/testA.m
new file mode 100644
index 00000000..6c9ed373
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/DP13_SB49/testA.m
@@ -0,0 +1,31 @@
+function testA()
+
+ fehler = 0;
+
+%syms x1 x2 x3;
+%f = [x1^2; x2 + x3; 3 * x3];
+%matlabFunction(f, 'file','myfuncA', 'vars', {[x1; x2; x3]});
+ [y, df] = numdiff(@myfuncA,[2;4;5],[0.25;0.5;0.5]);
+
+disp('--------------------------------------------------------------')
+if (y(1)~=4 || y(2)~=9 || y(3)~=15)
+ fehler =1;
+ disp('Testcase nicht erfuellt: a) f falsch')
+end
+A=[4.25 0 0;0 1 1;0 0 3];
+for i=1:3
+ for j=1:3
+ if (df(i,j)~= A(i,j))
+ fehler =1;
+ disp('Testcase nicht erfuellt: a) J falsch')
+ end
+ end
+end
+
+ if (fehler == 0)
+ disp('Testcase fuer a) erfolgreich')
+ end
+disp('--------------------------------------------------------------')
+
+
+
diff --git a/ws2012/CE/uebungen/P4/DP13_SB49/testB.m b/ws2012/CE/uebungen/P4/DP13_SB49/testB.m
new file mode 100644
index 00000000..6a58c262
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/DP13_SB49/testB.m
@@ -0,0 +1,19 @@
+function testB()
+
+ fehler = 0;
+
+% syms x1 x2 x3;
+% f=[x1^2];
+ %jac=jacobian(f)
+ %matlabFunction(f, 'file','myfuncB', 'vars', {[x1]});
+ %matlabFunction(jac, 'file','myjacB', 'vars', {[x1]});
+
+ disp('--------------------------------------------------------------')
+ if exist('diffplot.m')==0
+ disp('Keine Loesung fuer Aufgabe b) gefunden ')
+ else
+ diffplot(@myfuncB, @myjacB, [1])
+ end
+
+ disp('--------------------------------------------------------------')
+
diff --git "a/ws2012/CE/uebungen/P4/Icon\r" "b/ws2012/CE/uebungen/P4/Icon\r"
new file mode 100644
index 00000000..e69de29b
diff --git a/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/diffplot.m b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/diffplot.m
new file mode 100755
index 00000000..9437d0d1
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/diffplot.m
@@ -0,0 +1,13 @@
+function diffplot(fun, jac, x)
+%
+%
+% [f, J] = diffplot(fun, jac, x) plots difference between symbolic
+% differentiation and approximation by finite differences
+%
+% INPUT
+% fun function handle; fun: R^n -> R^n
+% jac function handle; jac: R^n -> R^(mxn)
+% x point x in R^n to evaluate f and jacobian
+%
+
+end % function diffplot
diff --git a/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/myfuncA.m b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/myfuncA.m
new file mode 100755
index 00000000..e9896781
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/myfuncA.m
@@ -0,0 +1,11 @@
+function f = myfuncA(in1)
+%MYFUNCA
+% F = MYFUNCA(IN1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:42:28
+
+x1 = in1(1,:);
+x2 = in1(2,:);
+x3 = in1(3,:);
+f = [x1.^2;x2+x3;x3.*3.0];
diff --git a/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/myfuncB.m b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/myfuncB.m
new file mode 100755
index 00000000..39b35a11
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/myfuncB.m
@@ -0,0 +1,8 @@
+function f = myfuncB(x1)
+%MYFUNCB
+% F = MYFUNCB(X1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:41:51
+
+f = x1.^2;
diff --git a/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/myjacB.m b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/myjacB.m
new file mode 100755
index 00000000..87d93866
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/myjacB.m
@@ -0,0 +1,8 @@
+function jac = myjacB(x1)
+%MYJACB
+% JAC = MYJACB(X1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:41:51
+
+jac = reshape([x1.*2.0],[1, 1]);
diff --git a/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/numdiff.m b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/numdiff.m
new file mode 100755
index 00000000..c822d7f5
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/numdiff.m
@@ -0,0 +1,17 @@
+function [f, J] = numdiff(fun,x,delta)
+%
+%
+% [f, J] = numdiff(fun,x,delta) computes jacobian with difference quotient
+%
+% INPUT
+% fun function handle
+% x point x to evaluate f and approximate jacobian
+% delta stepsize for difference approximation
+% OUTPUT
+% f value f(x)
+% J jacobian at x
+%
+
+
+end % function numdiff
+
diff --git a/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/testA.m b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/testA.m
new file mode 100755
index 00000000..6c9ed373
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/testA.m
@@ -0,0 +1,31 @@
+function testA()
+
+ fehler = 0;
+
+%syms x1 x2 x3;
+%f = [x1^2; x2 + x3; 3 * x3];
+%matlabFunction(f, 'file','myfuncA', 'vars', {[x1; x2; x3]});
+ [y, df] = numdiff(@myfuncA,[2;4;5],[0.25;0.5;0.5]);
+
+disp('--------------------------------------------------------------')
+if (y(1)~=4 || y(2)~=9 || y(3)~=15)
+ fehler =1;
+ disp('Testcase nicht erfuellt: a) f falsch')
+end
+A=[4.25 0 0;0 1 1;0 0 3];
+for i=1:3
+ for j=1:3
+ if (df(i,j)~= A(i,j))
+ fehler =1;
+ disp('Testcase nicht erfuellt: a) J falsch')
+ end
+ end
+end
+
+ if (fehler == 0)
+ disp('Testcase fuer a) erfolgreich')
+ end
+disp('--------------------------------------------------------------')
+
+
+
diff --git a/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/testB.m b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/testB.m
new file mode 100755
index 00000000..6a58c262
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4FiniteDifferenz-NOSYMBOLIC/testB.m
@@ -0,0 +1,19 @@
+function testB()
+
+ fehler = 0;
+
+% syms x1 x2 x3;
+% f=[x1^2];
+ %jac=jacobian(f)
+ %matlabFunction(f, 'file','myfuncB', 'vars', {[x1]});
+ %matlabFunction(jac, 'file','myjacB', 'vars', {[x1]});
+
+ disp('--------------------------------------------------------------')
+ if exist('diffplot.m')==0
+ disp('Keine Loesung fuer Aufgabe b) gefunden ')
+ else
+ diffplot(@myfuncB, @myjacB, [1])
+ end
+
+ disp('--------------------------------------------------------------')
+
diff --git a/ws2012/CE/uebungen/P4/P4Matlab/Aufgabe b) - Graph.pdf b/ws2012/CE/uebungen/P4/P4Matlab/Aufgabe b) - Graph.pdf
new file mode 100644
index 00000000..1d95fd12
Binary files /dev/null and b/ws2012/CE/uebungen/P4/P4Matlab/Aufgabe b) - Graph.pdf differ
diff --git a/ws2012/CE/uebungen/P4/P4Matlab/Gruppe & Matrikelnummern.txt b/ws2012/CE/uebungen/P4/P4Matlab/Gruppe & Matrikelnummern.txt
new file mode 100644
index 00000000..106c87d1
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Matlab/Gruppe & Matrikelnummern.txt
@@ -0,0 +1,4 @@
+Gruppe:
+ - Michael Scholz (Matr.# 1576630)
+ - David Kaufmann (Matr.# 1481864)
+ - Dennis Werner (Matr.# 1513509)
diff --git a/ws2012/CE/uebungen/P4/P4Matlab/diffplot.m b/ws2012/CE/uebungen/P4/P4Matlab/diffplot.m
new file mode 100755
index 00000000..a7c45c3c
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Matlab/diffplot.m
@@ -0,0 +1,34 @@
+function diffplot(fun, jac, x)
+%
+%
+% [f, J] = diffplot(fun, jac, x) plots difference between symbolic
+% differentiation and approximation by finite differences
+%
+% INPUT
+% fun function handle; fun: R^n -> R^n
+% jac function handle; jac: R^n -> R^(mxn)
+% x point x in R^n to evaluate f and jacobian
+%
+
+% leere arrays für die ergebnisse erstellen.
+y_werte = zeros(19);
+x_werte = zeros(19);
+for i=0:18
+ % x-achse 'befüllen'
+ x_werte(i+1) = i;
+ % delta berechnen
+ delta = 10^(-i);
+ % Approximierte Jacobi-Matrix berechnen
+ % f wird nicht benutzt und kann daher durch ~ ersetzt werden
+ [~, j_appr] = numdiff(fun, x, delta);
+ % Abweichungen der Matrizen berechnen und
+ % in den zugehörigen y-index speichern
+ y_werte(i+1) = norm(j_appr - jac(x));
+end
+
+%Graph plotten
+plot(x_werte, y_werte);
+title('Abweichungen zwischen approximierter und exakter Jacobi-Matrix durch unterschiedliche Deltawerte');
+ylabel('Abweichung der Matrizen')
+xlabel('Delta angegeben durch i (delta = 10^-^i)');
+end % function diffplot
diff --git a/ws2012/CE/uebungen/P4/P4Matlab/myfuncA.m b/ws2012/CE/uebungen/P4/P4Matlab/myfuncA.m
new file mode 100755
index 00000000..e9896781
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Matlab/myfuncA.m
@@ -0,0 +1,11 @@
+function f = myfuncA(in1)
+%MYFUNCA
+% F = MYFUNCA(IN1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:42:28
+
+x1 = in1(1,:);
+x2 = in1(2,:);
+x3 = in1(3,:);
+f = [x1.^2;x2+x3;x3.*3.0];
diff --git a/ws2012/CE/uebungen/P4/P4Matlab/myfuncB.m b/ws2012/CE/uebungen/P4/P4Matlab/myfuncB.m
new file mode 100755
index 00000000..39b35a11
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Matlab/myfuncB.m
@@ -0,0 +1,8 @@
+function f = myfuncB(x1)
+%MYFUNCB
+% F = MYFUNCB(X1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:41:51
+
+f = x1.^2;
diff --git a/ws2012/CE/uebungen/P4/P4Matlab/myjacB.m b/ws2012/CE/uebungen/P4/P4Matlab/myjacB.m
new file mode 100755
index 00000000..87d93866
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Matlab/myjacB.m
@@ -0,0 +1,8 @@
+function jac = myjacB(x1)
+%MYJACB
+% JAC = MYJACB(X1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:41:51
+
+jac = reshape([x1.*2.0],[1, 1]);
diff --git a/ws2012/CE/uebungen/P4/P4Matlab/numdiff.m b/ws2012/CE/uebungen/P4/P4Matlab/numdiff.m
new file mode 100644
index 00000000..c7bafc0f
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Matlab/numdiff.m
@@ -0,0 +1,37 @@
+function [f, J] = numdiff(fun,x,delta)
+%
+%
+% [f, J] = numdiff(fun,x,delta) computes jacobian with difference quotient
+%
+% INPUT
+% fun function handle
+% x point x to evaluate f and approximate jacobian
+% delta stepsize for difference approximation
+% OUTPUT
+% f value f(x)
+% J jacobian at x
+%
+
+% Übernehme Eingangsfunktion in f
+f=fun(x);
+% Gibt die Anzahl der Elemente im Array zurück und somit die Dimension von f.
+m=numel(f);
+% Gibt die Anzahl der Elemente im Array zurück und somit die Dimension von x.
+n=numel(x);
+
+% Erstelle Jacobi-Matrix und fülle mit Nullen
+J=zeros(m,n);
+% Einheitsmatrix für e_j -> wird für Funktionsdefinition benötigt
+I=eye(n);
+% Schleife um die Jacobi-Matrix zu füllen.
+for i=1:m
+ for j=1:n
+ % delta j berechnen
+ dj = delta(j);
+ % Funktion definieren
+ df = (fun(x+dj*I(:,j))-fun(x));
+ % Approximation berechnen und in Matrix speichern
+ J(i,j) = df(i)/dj;
+ end
+end % function numdiff
+
diff --git a/ws2012/CE/uebungen/P4/P4Matlab/testA.m b/ws2012/CE/uebungen/P4/P4Matlab/testA.m
new file mode 100755
index 00000000..6c9ed373
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Matlab/testA.m
@@ -0,0 +1,31 @@
+function testA()
+
+ fehler = 0;
+
+%syms x1 x2 x3;
+%f = [x1^2; x2 + x3; 3 * x3];
+%matlabFunction(f, 'file','myfuncA', 'vars', {[x1; x2; x3]});
+ [y, df] = numdiff(@myfuncA,[2;4;5],[0.25;0.5;0.5]);
+
+disp('--------------------------------------------------------------')
+if (y(1)~=4 || y(2)~=9 || y(3)~=15)
+ fehler =1;
+ disp('Testcase nicht erfuellt: a) f falsch')
+end
+A=[4.25 0 0;0 1 1;0 0 3];
+for i=1:3
+ for j=1:3
+ if (df(i,j)~= A(i,j))
+ fehler =1;
+ disp('Testcase nicht erfuellt: a) J falsch')
+ end
+ end
+end
+
+ if (fehler == 0)
+ disp('Testcase fuer a) erfolgreich')
+ end
+disp('--------------------------------------------------------------')
+
+
+
diff --git a/ws2012/CE/uebungen/P4/P4Matlab/testB.m b/ws2012/CE/uebungen/P4/P4Matlab/testB.m
new file mode 100755
index 00000000..6a58c262
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Matlab/testB.m
@@ -0,0 +1,19 @@
+function testB()
+
+ fehler = 0;
+
+% syms x1 x2 x3;
+% f=[x1^2];
+ %jac=jacobian(f)
+ %matlabFunction(f, 'file','myfuncB', 'vars', {[x1]});
+ %matlabFunction(jac, 'file','myjacB', 'vars', {[x1]});
+
+ disp('--------------------------------------------------------------')
+ if exist('diffplot.m')==0
+ disp('Keine Loesung fuer Aufgabe b) gefunden ')
+ else
+ diffplot(@myfuncB, @myjacB, [1])
+ end
+
+ disp('--------------------------------------------------------------')
+
diff --git a/ws2012/CE/uebungen/P4/P4Scilab/diffplot.m b/ws2012/CE/uebungen/P4/P4Scilab/diffplot.m
new file mode 100755
index 00000000..9437d0d1
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Scilab/diffplot.m
@@ -0,0 +1,13 @@
+function diffplot(fun, jac, x)
+%
+%
+% [f, J] = diffplot(fun, jac, x) plots difference between symbolic
+% differentiation and approximation by finite differences
+%
+% INPUT
+% fun function handle; fun: R^n -> R^n
+% jac function handle; jac: R^n -> R^(mxn)
+% x point x in R^n to evaluate f and jacobian
+%
+
+end % function diffplot
diff --git a/ws2012/CE/uebungen/P4/P4Scilab/numdiff.m b/ws2012/CE/uebungen/P4/P4Scilab/numdiff.m
new file mode 100755
index 00000000..c822d7f5
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Scilab/numdiff.m
@@ -0,0 +1,17 @@
+function [f, J] = numdiff(fun,x,delta)
+%
+%
+% [f, J] = numdiff(fun,x,delta) computes jacobian with difference quotient
+%
+% INPUT
+% fun function handle
+% x point x to evaluate f and approximate jacobian
+% delta stepsize for difference approximation
+% OUTPUT
+% f value f(x)
+% J jacobian at x
+%
+
+
+end % function numdiff
+
diff --git a/ws2012/CE/uebungen/P4/P4Scilab/testA.m b/ws2012/CE/uebungen/P4/P4Scilab/testA.m
new file mode 100644
index 00000000..dfd4d6ee
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Scilab/testA.m
@@ -0,0 +1,31 @@
+function testA()
+
+ fehler = 0;
+
+ syms x1 x2 x3;
+ f = [x1^2; x2 + x3; 3 * x3];
+ matlabFunction(f, 'file','myfunc', 'vars', {[x1; x2; x3]});
+ [y, df] = numdiff(@myfunc,[2;4;5],[0.25;0.5;0.5]);
+
+disp('--------------------------------------------------------------')
+if (y(1)~=4 || y(2)~=9 || y(3)~=15)
+ fehler =1;
+ disp('Testcase nicht erfuellt: a) f falsch')
+end
+A=[4.25 0 0;0 1 1;0 0 3];
+for i=1:3
+ for j=1:3
+ if (df(i,j)~= A(i,j))
+ fehler =1;
+ disp('Testcase nicht erfuellt: a) J falsch')
+ end
+ end
+end
+
+ if (fehler == 0)
+ disp('Testcase fuer a) erfolgreich')
+ end
+disp('--------------------------------------------------------------')
+
+
+
diff --git a/ws2012/CE/uebungen/P4/P4Scilab/testB.m b/ws2012/CE/uebungen/P4/P4Scilab/testB.m
new file mode 100644
index 00000000..fd327b09
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/P4Scilab/testB.m
@@ -0,0 +1,19 @@
+function testB()
+
+ fehler = 0;
+
+ syms x1;
+ f=[x1^2];
+ jac=jacobian(f)
+ matlabFunction(f, 'file','myfunc', 'vars', {[x1]});
+ matlabFunction(jac, 'file','myjac', 'vars', {[x1]});
+
+ disp('--------------------------------------------------------------')
+ if exist('diffplot.m')==0
+ disp('Keine Loesung fuer Aufgabe b) gefunden ')
+ else
+ diffplot(@myfunc, @myjac, [1])
+ end
+
+ disp('--------------------------------------------------------------')
+
diff --git a/ws2012/CE/uebungen/P4/PJ48_JH79/diffplot.m b/ws2012/CE/uebungen/P4/PJ48_JH79/diffplot.m
new file mode 100644
index 00000000..bbab5737
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/PJ48_JH79/diffplot.m
@@ -0,0 +1,33 @@
+function diffplot(fun, jac, x)
+%
+%
+% [f, J] = diffplot(fun, jac, x) plots difference between symbolic
+% differentiation and approximation by finite differences
+%
+% INPUT
+% fun function handle; fun: R^n -> R^n
+% jac function handle; jac: R^n -> R^(mxn)
+% x point x in R^n to evaluate f and jacobian
+%
+
+j = jac(x); %Exakte Lösung hinterlegen
+
+diffs = zeros(19); %Speicher für Abweichungswerte initialisieren (für Darstellung)
+is = zeros(19); %Speicher für Iterationsnummern initialisieren (für Darstellung)
+
+for i=0:18
+ delta = ones(size(x,1))*10^-i; %Schrittweite vorbereiten
+ [~, J] = numdiff(fun, x, delta); %Jacobimatrix approximieren
+ diffs(i+1) = norm((J-j),2); %Abweichung berechnen (numerisch <-> exakt)
+ is(i+1) = i; %Iterationsnummer speichern (für Darstellung)
+end
+
+%Plotten
+plot(is,diffs);
+title('Abweichung der numerischen Approximation der Jacobimatrix');
+legend('Fehlerkurve')
+xlabel('Iterationen');
+ylabel('Abweichung');
+
+
+end % function diffplot
diff --git a/ws2012/CE/uebungen/P4/PJ48_JH79/myfuncA.m b/ws2012/CE/uebungen/P4/PJ48_JH79/myfuncA.m
new file mode 100644
index 00000000..e9896781
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/PJ48_JH79/myfuncA.m
@@ -0,0 +1,11 @@
+function f = myfuncA(in1)
+%MYFUNCA
+% F = MYFUNCA(IN1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:42:28
+
+x1 = in1(1,:);
+x2 = in1(2,:);
+x3 = in1(3,:);
+f = [x1.^2;x2+x3;x3.*3.0];
diff --git a/ws2012/CE/uebungen/P4/PJ48_JH79/myfuncB.m b/ws2012/CE/uebungen/P4/PJ48_JH79/myfuncB.m
new file mode 100644
index 00000000..39b35a11
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/PJ48_JH79/myfuncB.m
@@ -0,0 +1,8 @@
+function f = myfuncB(x1)
+%MYFUNCB
+% F = MYFUNCB(X1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:41:51
+
+f = x1.^2;
diff --git a/ws2012/CE/uebungen/P4/PJ48_JH79/myjacB.m b/ws2012/CE/uebungen/P4/PJ48_JH79/myjacB.m
new file mode 100644
index 00000000..87d93866
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/PJ48_JH79/myjacB.m
@@ -0,0 +1,8 @@
+function jac = myjacB(x1)
+%MYJACB
+% JAC = MYJACB(X1)
+
+% This function was generated by the Symbolic Math Toolbox version 5.8.
+% 15-Jan-2013 23:41:51
+
+jac = reshape([x1.*2.0],[1, 1]);
diff --git a/ws2012/CE/uebungen/P4/PJ48_JH79/numdiff.m b/ws2012/CE/uebungen/P4/PJ48_JH79/numdiff.m
new file mode 100644
index 00000000..ce5ebaf9
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/PJ48_JH79/numdiff.m
@@ -0,0 +1,28 @@
+function [f, J] = numdiff(fun,x,delta)
+%
+%
+% [f, J] = numdiff(fun,x,delta) computes jacobian with difference quotient
+%
+% INPUT
+% fun function handle
+% x point x to evaluate f and approximate jacobian
+% delta stepsize for difference approximation
+% OUTPUT
+% f value f(x)
+% J jacobian at x
+%
+
+f = fun(x); %Funktionswert berechnen
+I = eye(size(x,1)); %einheitsmatrix für ej
+J = zeros(size(f,1),size(x,1)); %Jacobimatrix in richtiger Größe initialisieren
+
+for i=1:size(f)
+ for j=1:size(x)
+ deltaj = delta(j); %Aktuelle Schrittweite holen
+ deltaf = fun(x+deltaj*I(:,j))-fun(x); %Funktion berechnen
+ J(i,j) = deltaf(i)/deltaj; %Matrixkomponente berechnen und speichern
+ end
+end
+
+end % function numdiff
+
diff --git a/ws2012/CE/uebungen/P4/PJ48_JH79/testA.m b/ws2012/CE/uebungen/P4/PJ48_JH79/testA.m
new file mode 100644
index 00000000..6c9ed373
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/PJ48_JH79/testA.m
@@ -0,0 +1,31 @@
+function testA()
+
+ fehler = 0;
+
+%syms x1 x2 x3;
+%f = [x1^2; x2 + x3; 3 * x3];
+%matlabFunction(f, 'file','myfuncA', 'vars', {[x1; x2; x3]});
+ [y, df] = numdiff(@myfuncA,[2;4;5],[0.25;0.5;0.5]);
+
+disp('--------------------------------------------------------------')
+if (y(1)~=4 || y(2)~=9 || y(3)~=15)
+ fehler =1;
+ disp('Testcase nicht erfuellt: a) f falsch')
+end
+A=[4.25 0 0;0 1 1;0 0 3];
+for i=1:3
+ for j=1:3
+ if (df(i,j)~= A(i,j))
+ fehler =1;
+ disp('Testcase nicht erfuellt: a) J falsch')
+ end
+ end
+end
+
+ if (fehler == 0)
+ disp('Testcase fuer a) erfolgreich')
+ end
+disp('--------------------------------------------------------------')
+
+
+
diff --git a/ws2012/CE/uebungen/P4/PJ48_JH79/testB.m b/ws2012/CE/uebungen/P4/PJ48_JH79/testB.m
new file mode 100644
index 00000000..6a58c262
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/PJ48_JH79/testB.m
@@ -0,0 +1,19 @@
+function testB()
+
+ fehler = 0;
+
+% syms x1 x2 x3;
+% f=[x1^2];
+ %jac=jacobian(f)
+ %matlabFunction(f, 'file','myfuncB', 'vars', {[x1]});
+ %matlabFunction(jac, 'file','myjacB', 'vars', {[x1]});
+
+ disp('--------------------------------------------------------------')
+ if exist('diffplot.m')==0
+ disp('Keine Loesung fuer Aufgabe b) gefunden ')
+ else
+ diffplot(@myfuncB, @myjacB, [1])
+ end
+
+ disp('--------------------------------------------------------------')
+
diff --git a/ws2012/CE/uebungen/P4/Uebung.pdf b/ws2012/CE/uebungen/P4/Uebung.pdf
new file mode 100644
index 00000000..59f2c292
Binary files /dev/null and b/ws2012/CE/uebungen/P4/Uebung.pdf differ
diff --git a/ws2012/CE/uebungen/P4/numerik aufgabe münchen.pdf b/ws2012/CE/uebungen/P4/numerik aufgabe münchen.pdf
new file mode 100644
index 00000000..549f308f
Binary files /dev/null and b/ws2012/CE/uebungen/P4/numerik aufgabe münchen.pdf differ
diff --git a/ws2012/CE/uebungen/P4/vergangene Semester/beam.m b/ws2012/CE/uebungen/P4/vergangene Semester/beam.m
new file mode 100644
index 00000000..4efbc190
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/vergangene Semester/beam.m
@@ -0,0 +1,74 @@
+function dx = beam(t,x)
+
+% dx = beam(t,x)
+% Wertet rechte Seite des auf 1. Ordnung transformierten DGL-System
+% aus Aufgabe P4 aus.
+%
+% Eingaben:
+% t - Zeitpunkt (skalar)
+% x - x = [theta; thetap];
+% 2*n-elementiger Vektor, der Auslenkungswinkel theta sowie
+% Winkelgeschwindigkeit thetap an allen Stuetzstellen
+% k = 1...n enthaelt
+
+
+% Ortsdiskretisierung
+n = length(x)/2;
+
+% Krafteinwirkung am Stabende (Funktion phi siehe unten)
+Fx = -phi(t);
+Fy = phi(t);
+
+% Auslenkungswinkel und Winkelgeschwindigkeit
+theta = x(1:n);
+thetap = x(n+1:2*n);
+
+xi = zeros(n+2,1);
+xi(2:n+1) = theta;
+xi(1) = -xi(2);
+xi(n+2) = xi(n+1);
+
+
+% Berechnung von der Ableitung von thetap ----------------------------------------------------------
+G = zeros(n);
+v = zeros(n,1);
+
+for l = 1:n
+ for k = 1:n
+ G(l,k) = n + 1/2 - max(l,k);
+ end
+ v(l) = n^4 * (xi(l) - 2*xi(l+1) + xi(l+2)) + n^2 * (cos(xi(l+1)) * Fy - sin(xi(l+1)) * Fx);
+end
+
+CD = diag(exp(1i*theta)) * inv(G) * diag(exp(-1i*theta));
+
+C = real(CD);
+D = imag(CD);
+
+w = D * v + thetap.^2;
+
+u = C\w;
+
+dthetap = C*v + D*u;
+% --------------------------------------------------------------------------------------------------
+
+
+% Ableitung von theta gleich thetap
+dtheta = thetap;
+
+% Rueckgabe dx
+dx = [dtheta; dthetap];
+
+end
+
+
+
+
+function p = phi(t)
+ if t >= 0 && t <= pi
+ p = 1.5 * sin(t)^2;
+ else
+ p = 0;
+ end
+end
+
diff --git a/ws2012/CE/uebungen/P4/vergangene Semester/matrikelnummer.m b/ws2012/CE/uebungen/P4/vergangene Semester/matrikelnummer.m
new file mode 100644
index 00000000..64fc5a68
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/vergangene Semester/matrikelnummer.m
@@ -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
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P4/vergangene Semester/numdiff.m b/ws2012/CE/uebungen/P4/vergangene Semester/numdiff.m
new file mode 100644
index 00000000..e72a108b
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/vergangene Semester/numdiff.m
@@ -0,0 +1,35 @@
+function [f1,J1]=numdiff(f, x, varargin)
+%
+% [fx,Jx]= numdiff(f, x, delta)
+%
+% computes Jacobian based on finite differences
+% INPUT
+% f function handle
+% x point tu evaluate f
+% delta (optional) stepsize
+% OUTPUT
+% fx value of f(x)
+% Jx Jacobian of f at x
+%
+
+
+n=numel(x);
+
+if nargin<3
+ delta = 0.0001*ones(1,n);
+end
+
+f1=f(x);
+
+m=numel(f1);
+
+J1=zeros(m,n);
+
+for j=1:n
+ yj=f(x+delta(j)*(1:n==j)');
+ for i=1:m
+ J1(i,j)=(yj(i)-f1(i))*1/delta(j);
+ end
+end
+
+end
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P4/vergangene Semester/plotbeam.m b/ws2012/CE/uebungen/P4/vergangene Semester/plotbeam.m
new file mode 100644
index 00000000..28a9375e
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/vergangene Semester/plotbeam.m
@@ -0,0 +1,52 @@
+function y = plotbeam(X)
+
+n = (size(X,2)-1)/2; % Diskretisierung des Stabes
+
+% aus Effizienzgründen je nach Anzahl von Auswertung nur jede k-te zeichnen
+if size(X,1) > 10000
+ k = 100;
+elseif size(X,1) > 1000;
+ k = 20;
+elseif size(X,1) > 200
+ k = 10;
+else
+ k = 1;
+end
+
+% x- und y-Position der einzelnen Stabknoten
+posx = zeros(size(X,1)+1,n);
+posy = zeros(size(X,1)+1,n);
+
+
+for i = 1:size(X,1) % fuer alle Auswertungen
+ if mod(i,k) == 0
+
+ t = X(i,1); % Zeitpunkt t
+
+ % Generierung der x,y-Koordinaten aus berechneten Winkeldaten
+ for l = 1:n % fuer alle Stabstuetzstellen
+ posx(i,l) = 1/n * sum(sin(X(i,2:l+1))); % diskretisiertes Integral (MP-Regel)
+ posy(i,l) = 1/n * sum(cos(X(i,2:l+1)));
+ end
+
+ % plotte Stab
+ subplot(211)
+ grid on;
+ hold on;
+ plot3(t*ones(n,1),posx(i,:),posy(i,:),'.-'); % 3D-Perspektive
+ axis square
+ xlim([0,X(size(X,1),1)])
+ ylim([-0.8 0.8])
+ zlim([0 1.2])
+ set(gca,'CameraPosition',[-36 -6 3],'CameraTarget',[2.5 0 0.6],'CameraUpVector',[0 0 1])
+
+ subplot(212)
+ plot(posx(i,:),posy(i,:),'.-'); % 2D-Draufsicht
+ axis square
+ xlim([-0.8 0.8])
+ ylim([0 1.2])
+ pause(0.1)
+ end
+end
+
+y = 1;
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P4/vergangene Semester/quasi_newton.m b/ws2012/CE/uebungen/P4/vergangene Semester/quasi_newton.m
new file mode 100644
index 00000000..dc5afeca
--- /dev/null
+++ b/ws2012/CE/uebungen/P4/vergangene Semester/quasi_newton.m
@@ -0,0 +1,69 @@
+function [x_itn, N] = quasi_newton(f,x)
+
+
+% Rechengenauigkeit
+eps = 10^(-8)*[1,1]';
+% Iterationschritte
+N = 0;
+N_max = 5000;
+
+
+% Berechnen der Nullten Jacobimatrix mit uebergebenem x
+[~,DfDx] = numdiff(f, x);
+J = DfDx;
+
+
+alpha =1;
+
+% Newton-Iteration
+while (N <= N_max)
+ % Speichern der Werte fuer die Ausgabe
+ x_itn(:,N+1) = x;
+ % Quasi-Newton-Schritt
+ delta_x = J \ -f(x);
+ x_neu = x + delta_x;
+
+ % Iterationszaehler wird erhoeht
+ N = N + 1;
+
+ % Ueberpruefung
+ % Bilden der Differenz des alten und neuen X-Wertes. Weisen die beiden Komponenten des Ergebnisvektors
+ % keinen nennenswerte Abnahme mehr vor (mehr als eps), wird die
+ % Berechnung abgebrochen
+ if(norm(delta_x) <= eps(1))
+ break
+ end
+
+ % Bilden der neuen approximierten Jacobimatrix
+ delta_f = f(x_neu) - f(x);
+ update = 1/((alpha*delta_x)'*(alpha*delta_x))* (delta_f-J*alpha*delta_x) *(alpha*delta_x)';
+ J = J + update;
+ x = x_neu;
+end
+
+% Ruhepunkt
+xs = x_neu;
+
+
+%
+% %----- Ausgabe -----
+%
+% % plot oben rechts
+% subplot(222)
+% xlabel ('N Schritte');
+% ylabel ('Angenommener Wert');
+% plot(1:N,x_itn(1,:))
+% % plot unten links
+% subplot(223)
+% xlabel ('N Schritte');
+% ylabel ('Angenommener Wert');
+% plot(1:N,x_itn(2,:))
+% % plot unten rechts
+% % ----- Ende Ausgabe -----
+
+end
+
+
+
+
+
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Project.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Project.xml
new file mode 100644
index 00000000..8e4d50a7
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Project.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/ProjectData.type.Info.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/ProjectData.type.Info.xml
new file mode 100644
index 00000000..7f6b42b4
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/ProjectData.type.Info.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category.xml
new file mode 100644
index 00000000..b8e836dd
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/artifact.type.Label.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/artifact.type.Label.xml
new file mode 100644
index 00000000..4e305c2a
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/artifact.type.Label.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/convenience.type.Label.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/convenience.type.Label.xml
new file mode 100644
index 00000000..28b95ee9
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/convenience.type.Label.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/derived.type.Label.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/derived.type.Label.xml
new file mode 100644
index 00000000..af6bb77d
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/derived.type.Label.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/design.type.Label.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/design.type.Label.xml
new file mode 100644
index 00000000..e1b779ca
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/design.type.Label.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/none.type.Label.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/none.type.Label.xml
new file mode 100644
index 00000000..ca9a4635
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/none.type.Label.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/other.type.Label.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/other.type.Label.xml
new file mode 100644
index 00000000..3008d409
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/FileClassCategory.type.Category/other.type.Label.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category.xml
new file mode 100644
index 00000000..c6d62e17
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/approved.type.Label.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/approved.type.Label.xml
new file mode 100644
index 00000000..388805b8
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/approved.type.Label.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/needMoreInfo.type.Label.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/needMoreInfo.type.Label.xml
new file mode 100644
index 00000000..3adca149
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/needMoreInfo.type.Label.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/rejected.type.Label.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/rejected.type.Label.xml
new file mode 100644
index 00000000..1247424b
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/rejected.type.Label.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/toReview.type.Label.xml b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/toReview.type.Label.xml
new file mode 100644
index 00000000..3bffe751
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.SimulinkProject/Root.type.Categories/ReviewCategory.type.Category/toReview.type.Label.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/.dropbox b/ws2012/CE/uebungen/P5/.dropbox
new file mode 100644
index 00000000..bd261b0e
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/.dropbox
@@ -0,0 +1 @@
+228868001
diff --git a/ws2012/CE/uebungen/P5/EiCE_Uebung11.pdf b/ws2012/CE/uebungen/P5/EiCE_Uebung11.pdf
new file mode 100644
index 00000000..74147dc3
Binary files /dev/null and b/ws2012/CE/uebungen/P5/EiCE_Uebung11.pdf differ
diff --git "a/ws2012/CE/uebungen/P5/Icon\r" "b/ws2012/CE/uebungen/P5/Icon\r"
new file mode 100644
index 00000000..e69de29b
diff --git a/ws2012/CE/uebungen/P5/LoesungDennis/GraphP5.m b/ws2012/CE/uebungen/P5/LoesungDennis/GraphP5.m
new file mode 100644
index 00000000..52feca0c
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/LoesungDennis/GraphP5.m
@@ -0,0 +1,39 @@
+function GraphP5()
+%GRAPHP5DENNIS Summary of this function goes here
+% Detailed explanation goes here
+
+
+
+ % --> Fehler war in der .mdl. Ouput muss als Array definiert werden. Somit bekommen wir jetzt auch die Zeichnungen, die
+ % die Jungs bekommen ;) Schönen Tag noch !!!
+ assignin('base', 'x_start', 10)
+ assignin('base', 'y_start', 0)
+ %sim('p5d', x_start, y_start)
+
+ sim('P5')
+
+
+ %simOutVars = sim/'p4.who
+ %assignin('base', x_start, 10)
+ %assignin('base', y_start, 10)
+ figure(1)
+ plot(x_out, y_out)
+ %plot(x_out);
+ title('')
+ ylabel('')
+ xlabel('');
+ print -painters -dpdf -r600 P5Test-1.pdf
+
+
+ assignin('base', 'x_start', 0)
+ assignin('base', 'y_start', 10)
+ %sim('p5d', x_start, y_start)
+
+ sim('P5')
+ figure(2)
+ plot(x_out, y_out)
+
+ print -painters -dpdf -r600 P5Test-2.pdf
+
+end
+
diff --git a/ws2012/CE/uebungen/P5/LoesungDennis/GraphP5Dennis.m b/ws2012/CE/uebungen/P5/LoesungDennis/GraphP5Dennis.m
new file mode 100644
index 00000000..bea206fc
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/LoesungDennis/GraphP5Dennis.m
@@ -0,0 +1,39 @@
+function GraphP5Dennis()
+%GRAPHP5DENNIS Summary of this function goes here
+% Detailed explanation goes here
+
+
+
+ % --> Fehler war in der .mdl. Ouput muss als Array definiert werden. Somit bekommen wir jetzt auch die Zeichnungen, die
+ % die Jungs bekommen ;) Schönen Tag noch !!!
+ assignin('base', 'x_start', 10)
+ assignin('base', 'y_start', 0)
+ %sim('p5d', x_start, y_start)
+
+ sim('p5dennis2')
+
+
+ %simOutVars = sim/'p4.who
+ %assignin('base', x_start, 10)
+ %assignin('base', y_start, 10)
+ figure(1)
+ plot(x_out, y_out)
+ %plot(x_out);
+ title('')
+ ylabel('')
+ xlabel('');
+ print -painters -dpdf -r600 P5Test-1.pdf
+
+
+ assignin('base', 'x_start', 0)
+ assignin('base', 'y_start', 10)
+ %sim('p5d', x_start, y_start)
+
+ sim('p5dennis2')
+ figure(2)
+ plot(x_out, y_out)
+
+ print -painters -dpdf -r600 P5Test-2.pdf
+
+end
+
diff --git a/ws2012/CE/uebungen/P5/LoesungDennis/P5.mdl b/ws2012/CE/uebungen/P5/LoesungDennis/P5.mdl
new file mode 100644
index 00000000..283bd758
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/LoesungDennis/P5.mdl
@@ -0,0 +1,1900 @@
+Model {
+ Name "p5dennis2"
+ Version 7.9
+ MdlSubVersion 0
+ GraphicalInterface {
+ NumRootInports 0
+ NumRootOutports 0
+ ParameterArgumentNames ""
+ ComputedModelVersion "1.11"
+ NumModelReferences 0
+ NumTestPointedSignals 0
+ }
+ SavedCharacterEncoding "UTF-8"
+ SaveDefaultBlockParams on
+ ScopeRefreshTime 0.035000
+ OverrideScopeRefreshTime on
+ DisableAllScopes off
+ DataTypeOverride "UseLocalSettings"
+ DataTypeOverrideAppliesTo "AllNumericTypes"
+ MinMaxOverflowLogging "UseLocalSettings"
+ MinMaxOverflowArchiveMode "Overwrite"
+ FPTRunName "Run 1"
+ MaxMDLFileLineLength 120
+ Created "Wed Feb 06 14:00:13 2013"
+ Creator "d_werner"
+ UpdateHistory "UpdateHistoryNever"
+ ModifiedByFormat "%"
+ LastModifiedBy "d_werner"
+ ModifiedDateFormat "%"
+ LastModifiedDate "Wed Feb 06 14:55:29 2013"
+ RTWModifiedTimeStamp 282063327
+ ModelVersionFormat "1.%"
+ ConfigurationManager "None"
+ SampleTimeColors off
+ SampleTimeAnnotations off
+ LibraryLinkDisplay "disabled"
+ WideLines off
+ ShowLineDimensions off
+ ShowPortDataTypes off
+ ShowDesignRanges off
+ ShowLoopsOnError on
+ IgnoreBidirectionalLines off
+ ShowStorageClass off
+ ShowTestPointIcons on
+ ShowSignalResolutionIcons on
+ ShowViewerIcons on
+ SortedOrder off
+ ExecutionContextIcon off
+ ShowLinearizationAnnotations on
+ BlockNameDataTip off
+ BlockParametersDataTip off
+ BlockDescriptionStringDataTip off
+ ToolBar on
+ StatusBar on
+ BrowserShowLibraryLinks off
+ BrowserLookUnderMasks off
+ SimulationMode "normal"
+ LinearizationMsg "none"
+ Profile off
+ ParamWorkspaceSource "MATLABWorkspace"
+ AccelSystemTargetFile "accel.tlc"
+ AccelTemplateMakefile "accel_default_tmf"
+ AccelMakeCommand "make_rtw"
+ TryForcingSFcnDF off
+ Object {
+ $PropName "DataLoggingOverride"
+ $ObjectID 1
+ $ClassName "Simulink.SimulationData.ModelLoggingInfo"
+ model_ "p5dennis2"
+ overrideMode_ [0.0]
+ Array {
+ Type "Cell"
+ Dimension 1
+ Cell "p5dennis2"
+ PropName "logAsSpecifiedByModels_"
+ }
+ Array {
+ Type "Cell"
+ Dimension 0
+ PropName "logAsSpecifiedByModelsSSIDs_"
+ }
+ }
+ RecordCoverage off
+ CovPath "/"
+ CovSaveName "covdata"
+ CovMetricSettings "dw"
+ CovNameIncrementing off
+ CovHtmlReporting on
+ CovForceBlockReductionOff on
+ covSaveCumulativeToWorkspaceVar on
+ CovSaveSingleToWorkspaceVar on
+ CovCumulativeVarName "covCumulativeData"
+ CovCumulativeReport off
+ CovReportOnPause on
+ CovModelRefEnable "Off"
+ CovExternalEMLEnable off
+ ExtModeBatchMode off
+ ExtModeEnableFloating on
+ ExtModeTrigType "manual"
+ ExtModeTrigMode "normal"
+ ExtModeTrigPort "1"
+ ExtModeTrigElement "any"
+ ExtModeTrigDuration 1000
+ ExtModeTrigDurationFloating "auto"
+ ExtModeTrigHoldOff 0
+ ExtModeTrigDelay 0
+ ExtModeTrigDirection "rising"
+ ExtModeTrigLevel 0
+ ExtModeArchiveMode "off"
+ ExtModeAutoIncOneShot off
+ ExtModeIncDirWhenArm off
+ ExtModeAddSuffixToVar off
+ ExtModeWriteAllDataToWs off
+ ExtModeArmWhenConnect on
+ ExtModeSkipDownloadWhenConnect off
+ ExtModeLogAll on
+ ExtModeAutoUpdateStatusClock on
+ BufferReuse on
+ ShowModelReferenceBlockVersion off
+ ShowModelReferenceBlockIO off
+ Array {
+ Type "Handle"
+ Dimension 1
+ Simulink.ConfigSet {
+ $ObjectID 2
+ Version "1.12.0"
+ Array {
+ Type "Handle"
+ Dimension 8
+ Simulink.SolverCC {
+ $ObjectID 3
+ Version "1.12.0"
+ StartTime "0.0"
+ StopTime "100.0"
+ AbsTol "auto"
+ FixedStep "auto"
+ InitialStep "auto"
+ MaxNumMinSteps "-1"
+ MaxOrder 5
+ ZcThreshold "auto"
+ ConsecutiveZCsStepRelTol "10*128*eps"
+ MaxConsecutiveZCs "1000"
+ ExtrapolationOrder 4
+ NumberNewtonIterations 1
+ MaxStep "auto"
+ MinStep "auto"
+ MaxConsecutiveMinStep "1"
+ RelTol "1e-3"
+ SolverMode "Auto"
+ EnableConcurrentExecution off
+ ConcurrentTasks off
+ Solver "ode45"
+ SolverName "ode45"
+ SolverJacobianMethodControl "auto"
+ ShapePreserveControl "DisableAll"
+ ZeroCrossControl "UseLocalSettings"
+ ZeroCrossAlgorithm "Nonadaptive"
+ AlgebraicLoopSolver "TrustRegion"
+ SolverResetMethod "Fast"
+ PositivePriorityOrder off
+ AutoInsertRateTranBlk off
+ SampleTimeConstraint "Unconstrained"
+ InsertRTBMode "Whenever possible"
+ }
+ Simulink.DataIOCC {
+ $ObjectID 4
+ Version "1.12.0"
+ Decimation "1"
+ ExternalInput "[t, u]"
+ FinalStateName "xFinal"
+ InitialState "xInitial"
+ LimitDataPoints on
+ MaxDataPoints "1000"
+ LoadExternalInput off
+ LoadInitialState off
+ SaveFinalState off
+ SaveCompleteFinalSimState off
+ SaveFormat "Array"
+ SignalLoggingSaveFormat "ModelDataLogs"
+ SaveOutput on
+ SaveState off
+ SignalLogging on
+ DSMLogging on
+ InspectSignalLogs off
+ SaveTime on
+ ReturnWorkspaceOutputs off
+ StateSaveName "xout"
+ TimeSaveName "tout"
+ OutputSaveName "yout"
+ SignalLoggingName "logsout"
+ DSMLoggingName "dsmout"
+ OutputOption "RefineOutputTimes"
+ OutputTimes "[]"
+ ReturnWorkspaceOutputsName "out"
+ Refine "1"
+ }
+ Simulink.OptimizationCC {
+ $ObjectID 5
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 8
+ Cell "BooleansAsBitfields"
+ Cell "PassReuseOutputArgsAs"
+ Cell "PassReuseOutputArgsThreshold"
+ Cell "ZeroExternalMemoryAtStartup"
+ Cell "ZeroInternalMemoryAtStartup"
+ Cell "OptimizeModelRefInitCode"
+ Cell "NoFixptDivByZeroProtection"
+ Cell "UseSpecifiedMinMax"
+ PropName "DisabledProps"
+ }
+ BlockReduction on
+ BooleanDataType on
+ ConditionallyExecuteInputs on
+ InlineParams off
+ UseIntDivNetSlope off
+ UseFloatMulNetSlope off
+ UseSpecifiedMinMax off
+ InlineInvariantSignals off
+ OptimizeBlockIOStorage on
+ BufferReuse on
+ EnhancedBackFolding off
+ StrengthReduction off
+ ExpressionFolding on
+ BooleansAsBitfields off
+ BitfieldContainerType "uint_T"
+ EnableMemcpy on
+ MemcpyThreshold 64
+ PassReuseOutputArgsAs "Structure reference"
+ ExpressionDepthLimit 2147483647
+ FoldNonRolledExpr on
+ LocalBlockOutputs on
+ RollThreshold 5
+ SystemCodeInlineAuto off
+ StateBitsets off
+ DataBitsets off
+ UseTempVars off
+ ZeroExternalMemoryAtStartup on
+ ZeroInternalMemoryAtStartup on
+ InitFltsAndDblsToZero off
+ NoFixptDivByZeroProtection off
+ EfficientFloat2IntCast off
+ EfficientMapNaN2IntZero on
+ OptimizeModelRefInitCode off
+ LifeSpan "inf"
+ MaxStackSize "Inherit from target"
+ BufferReusableBoundary on
+ SimCompilerOptimization "Off"
+ AccelVerboseBuild off
+ ParallelExecutionInRapidAccelerator on
+ }
+ Simulink.DebuggingCC {
+ $ObjectID 6
+ Version "1.12.0"
+ RTPrefix "error"
+ ConsistencyChecking "none"
+ ArrayBoundsChecking "none"
+ SignalInfNanChecking "none"
+ SignalRangeChecking "none"
+ ReadBeforeWriteMsg "UseLocalSettings"
+ WriteAfterWriteMsg "UseLocalSettings"
+ WriteAfterReadMsg "UseLocalSettings"
+ AlgebraicLoopMsg "warning"
+ ArtificialAlgebraicLoopMsg "warning"
+ SaveWithDisabledLinksMsg "warning"
+ SaveWithParameterizedLinksMsg "warning"
+ CheckSSInitialOutputMsg on
+ UnderspecifiedInitializationDetection "Classic"
+ MergeDetectMultiDrivingBlocksExec "none"
+ CheckExecutionContextPreStartOutputMsg off
+ CheckExecutionContextRuntimeOutputMsg off
+ SignalResolutionControl "UseLocalSettings"
+ BlockPriorityViolationMsg "warning"
+ MinStepSizeMsg "warning"
+ TimeAdjustmentMsg "none"
+ MaxConsecutiveZCsMsg "error"
+ MaskedZcDiagnostic "warning"
+ IgnoredZcDiagnostic "warning"
+ SolverPrmCheckMsg "warning"
+ InheritedTsInSrcMsg "warning"
+ DiscreteInheritContinuousMsg "warning"
+ MultiTaskDSMMsg "error"
+ MultiTaskCondExecSysMsg "error"
+ MultiTaskRateTransMsg "error"
+ SingleTaskRateTransMsg "none"
+ TasksWithSamePriorityMsg "warning"
+ SigSpecEnsureSampleTimeMsg "warning"
+ CheckMatrixSingularityMsg "none"
+ IntegerOverflowMsg "warning"
+ Int32ToFloatConvMsg "warning"
+ ParameterDowncastMsg "error"
+ ParameterOverflowMsg "error"
+ ParameterUnderflowMsg "none"
+ ParameterPrecisionLossMsg "warning"
+ ParameterTunabilityLossMsg "warning"
+ FixptConstUnderflowMsg "none"
+ FixptConstOverflowMsg "none"
+ FixptConstPrecisionLossMsg "none"
+ UnderSpecifiedDataTypeMsg "none"
+ UnnecessaryDatatypeConvMsg "none"
+ VectorMatrixConversionMsg "none"
+ InvalidFcnCallConnMsg "error"
+ FcnCallInpInsideContextMsg "Enable All"
+ SignalLabelMismatchMsg "none"
+ UnconnectedInputMsg "warning"
+ UnconnectedOutputMsg "warning"
+ UnconnectedLineMsg "warning"
+ SFcnCompatibilityMsg "none"
+ FrameProcessingCompatibilityMsg "warning"
+ UniqueDataStoreMsg "none"
+ BusObjectLabelMismatch "warning"
+ RootOutportRequireBusObject "warning"
+ AssertControl "UseLocalSettings"
+ EnableOverflowDetection off
+ ModelReferenceIOMsg "none"
+ ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error"
+ ModelReferenceVersionMismatchMessage "none"
+ ModelReferenceIOMismatchMessage "none"
+ ModelReferenceCSMismatchMessage "none"
+ UnknownTsInhSupMsg "warning"
+ ModelReferenceDataLoggingMessage "warning"
+ ModelReferenceSymbolNameMessage "warning"
+ ModelReferenceExtraNoncontSigs "error"
+ StateNameClashWarn "warning"
+ SimStateInterfaceChecksumMismatchMsg "warning"
+ SimStateOlderReleaseMsg "error"
+ InitInArrayFormatMsg "warning"
+ StrictBusMsg "ErrorLevel1"
+ BusNameAdapt "WarnAndRepair"
+ NonBusSignalsTreatedAsBus "none"
+ LoggingUnavailableSignals "error"
+ BlockIODiagnostic "none"
+ SFUnusedDataAndEventsDiag "warning"
+ SFUnexpectedBacktrackingDiag "warning"
+ SFInvalidInputDataAccessInChartInitDiag "warning"
+ SFNoUnconditionalDefaultTransitionDiag "warning"
+ SFTransitionOutsideNaturalParentDiag "warning"
+ SFUnconditionalTransitionShadowingDiag "warning"
+ }
+ Simulink.HardwareCC {
+ $ObjectID 7
+ Version "1.12.0"
+ ProdBitPerChar 8
+ ProdBitPerShort 16
+ ProdBitPerInt 32
+ ProdBitPerLong 32
+ ProdBitPerFloat 32
+ ProdBitPerDouble 64
+ ProdBitPerPointer 32
+ ProdLargestAtomicInteger "Char"
+ ProdLargestAtomicFloat "None"
+ ProdIntDivRoundTo "Undefined"
+ ProdEndianess "Unspecified"
+ ProdWordSize 32
+ ProdShiftRightIntArith on
+ ProdHWDeviceType "32-bit Generic"
+ TargetBitPerChar 8
+ TargetBitPerShort 16
+ TargetBitPerInt 32
+ TargetBitPerLong 32
+ TargetBitPerFloat 32
+ TargetBitPerDouble 64
+ TargetBitPerPointer 32
+ TargetLargestAtomicInteger "Char"
+ TargetLargestAtomicFloat "None"
+ TargetShiftRightIntArith on
+ TargetIntDivRoundTo "Undefined"
+ TargetEndianess "Unspecified"
+ TargetWordSize 32
+ TargetTypeEmulationWarnSuppressLevel 0
+ TargetPreprocMaxBitsSint 32
+ TargetPreprocMaxBitsUint 32
+ TargetHWDeviceType "Specified"
+ TargetUnknown off
+ ProdEqTarget on
+ }
+ Simulink.ModelReferenceCC {
+ $ObjectID 8
+ Version "1.12.0"
+ UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
+ CheckModelReferenceTargetMessage "error"
+ EnableParallelModelReferenceBuilds off
+ ParallelModelReferenceErrorOnInvalidPool on
+ ParallelModelReferenceMATLABWorkerInit "None"
+ ModelReferenceNumInstancesAllowed "Multi"
+ PropagateVarSize "Infer from blocks in model"
+ ModelReferencePassRootInputsByReference on
+ ModelReferenceMinAlgLoopOccurrences off
+ PropagateSignalLabelsOutOfModel off
+ SupportModelReferenceSimTargetCustomCode off
+ }
+ Simulink.SFSimCC {
+ $ObjectID 9
+ Version "1.12.0"
+ SFSimEnableDebug on
+ SFSimOverflowDetection on
+ SFSimEcho on
+ SimBlas on
+ SimCtrlC on
+ SimExtrinsic on
+ SimIntegrity on
+ SimUseLocalCustomCode off
+ SimParseCustomCode on
+ SimBuildMode "sf_incremental_build"
+ }
+ Simulink.RTWCC {
+ $BackupClass "Simulink.RTWCC"
+ $ObjectID 10
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 9
+ Cell "IncludeHyperlinkInReport"
+ Cell "GenerateTraceInfo"
+ Cell "GenerateTraceReport"
+ Cell "GenerateTraceReportSl"
+ Cell "GenerateTraceReportSf"
+ Cell "GenerateTraceReportEml"
+ Cell "GenerateWebview"
+ Cell "GenerateCodeMetricsReport"
+ Cell "GenerateCodeReplacementReport"
+ PropName "DisabledProps"
+ }
+ SystemTargetFile "grt.tlc"
+ GenCodeOnly off
+ MakeCommand "make_rtw"
+ GenerateMakefile on
+ TemplateMakefile "grt_default_tmf"
+ GenerateReport off
+ SaveLog off
+ RTWVerbose on
+ RetainRTWFile off
+ ProfileTLC off
+ TLCDebug off
+ TLCCoverage off
+ TLCAssert off
+ ProcessScriptMode "Default"
+ ConfigurationMode "Optimized"
+ ConfigAtBuild off
+ RTWUseLocalCustomCode off
+ RTWUseSimCustomCode off
+ IncludeHyperlinkInReport off
+ LaunchReport off
+ TargetLang "C"
+ IncludeBusHierarchyInRTWFileBlockHierarchyMap off
+ IncludeERTFirstTime off
+ GenerateTraceInfo off
+ GenerateTraceReport off
+ GenerateTraceReportSl off
+ GenerateTraceReportSf off
+ GenerateTraceReportEml off
+ GenerateCodeInfo off
+ GenerateWebview off
+ GenerateCodeMetricsReport off
+ GenerateCodeReplacementReport off
+ RTWCompilerOptimization "Off"
+ CheckMdlBeforeBuild "Off"
+ CustomRebuildMode "OnUpdate"
+ Array {
+ Type "Handle"
+ Dimension 2
+ Simulink.CodeAppCC {
+ $ObjectID 11
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 21
+ Cell "IgnoreCustomStorageClasses"
+ Cell "IgnoreTestpoints"
+ Cell "InsertBlockDesc"
+ Cell "InsertPolySpaceComments"
+ Cell "SFDataObjDesc"
+ Cell "MATLABFcnDesc"
+ Cell "SimulinkDataObjDesc"
+ Cell "DefineNamingRule"
+ Cell "SignalNamingRule"
+ Cell "ParamNamingRule"
+ Cell "InlinedPrmAccess"
+ Cell "CustomSymbolStr"
+ Cell "CustomSymbolStrGlobalVar"
+ Cell "CustomSymbolStrType"
+ Cell "CustomSymbolStrField"
+ Cell "CustomSymbolStrFcn"
+ Cell "CustomSymbolStrFcnArg"
+ Cell "CustomSymbolStrBlkIO"
+ Cell "CustomSymbolStrTmpVar"
+ Cell "CustomSymbolStrMacro"
+ Cell "ReqsInCode"
+ PropName "DisabledProps"
+ }
+ ForceParamTrailComments off
+ GenerateComments on
+ IgnoreCustomStorageClasses on
+ IgnoreTestpoints off
+ IncHierarchyInIds off
+ MaxIdLength 31
+ PreserveName off
+ PreserveNameWithParent off
+ ShowEliminatedStatement off
+ IncAutoGenComments off
+ SimulinkDataObjDesc off
+ SFDataObjDesc off
+ MATLABFcnDesc off
+ IncDataTypeInIds off
+ MangleLength 1
+ CustomSymbolStrGlobalVar "$R$N$M"
+ CustomSymbolStrType "$N$R$M"
+ CustomSymbolStrField "$N$M"
+ CustomSymbolStrFcn "$R$N$M$F"
+ CustomSymbolStrFcnArg "rt$I$N$M"
+ CustomSymbolStrBlkIO "rtb_$N$M"
+ CustomSymbolStrTmpVar "$N$M"
+ CustomSymbolStrMacro "$R$N$M"
+ DefineNamingRule "None"
+ ParamNamingRule "None"
+ SignalNamingRule "None"
+ InsertBlockDesc off
+ InsertPolySpaceComments off
+ SimulinkBlockComments on
+ MATLABSourceComments off
+ EnableCustomComments off
+ InlinedPrmAccess "Literals"
+ ReqsInCode off
+ UseSimReservedNames off
+ }
+ Simulink.GRTTargetCC {
+ $BackupClass "Simulink.TargetCC"
+ $ObjectID 12
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 16
+ Cell "GeneratePreprocessorConditionals"
+ Cell "IncludeMdlTerminateFcn"
+ Cell "CombineOutputUpdateFcns"
+ Cell "SuppressErrorStatus"
+ Cell "ERTCustomFileBanners"
+ Cell "GenerateSampleERTMain"
+ Cell "GenerateTestInterfaces"
+ Cell "ModelStepFunctionPrototypeControlCompliant"
+ Cell "CPPClassGenCompliant"
+ Cell "MultiInstanceERTCode"
+ Cell "PurelyIntegerCode"
+ Cell "SupportComplex"
+ Cell "SupportAbsoluteTime"
+ Cell "SupportContinuousTime"
+ Cell "SupportNonInlinedSFcns"
+ Cell "PortableWordSizes"
+ PropName "DisabledProps"
+ }
+ TargetFcnLib "ansi_tfl_table_tmw.mat"
+ TargetLibSuffix ""
+ TargetPreCompLibLocation ""
+ CodeReplacementLibrary "ANSI_C"
+ UtilityFuncGeneration "Auto"
+ ERTMultiwordTypeDef "System defined"
+ CodeExecutionProfiling off
+ ERTMultiwordLength 256
+ MultiwordLength 2048
+ GenerateFullHeader on
+ GenerateSampleERTMain off
+ GenerateTestInterfaces off
+ IsPILTarget off
+ ModelReferenceCompliant on
+ ParMdlRefBuildCompliant on
+ CompOptLevelCompliant on
+ ConcurrentExecutionCompliant on
+ IncludeMdlTerminateFcn on
+ GeneratePreprocessorConditionals "Disable all"
+ CombineOutputUpdateFcns on
+ CombineSignalStateStructs off
+ SuppressErrorStatus off
+ ERTFirstTimeCompliant off
+ IncludeFileDelimiter "Auto"
+ ERTCustomFileBanners off
+ SupportAbsoluteTime on
+ LogVarNameModifier "rt_"
+ MatFileLogging on
+ MultiInstanceERTCode off
+ SupportNonFinite on
+ SupportComplex on
+ PurelyIntegerCode off
+ SupportContinuousTime on
+ SupportNonInlinedSFcns on
+ SupportVariableSizeSignals off
+ EnableShiftOperators on
+ ParenthesesLevel "Nominal"
+ PortableWordSizes off
+ ModelStepFunctionPrototypeControlCompliant off
+ CPPClassGenCompliant off
+ AutosarCompliant off
+ GRTInterface off
+ UseMalloc off
+ ExtMode off
+ ExtModeStaticAlloc off
+ ExtModeTesting off
+ ExtModeStaticAllocSize 1000000
+ ExtModeTransport 0
+ ExtModeMexFile "ext_comm"
+ ExtModeIntrfLevel "Level1"
+ RTWCAPISignals off
+ RTWCAPIParams off
+ RTWCAPIStates off
+ RTWCAPIRootIO off
+ GenerateASAP2 off
+ }
+ PropName "Components"
+ }
+ }
+ PropName "Components"
+ }
+ Name "Configuration"
+ CurrentDlgPage "Solver"
+ ConfigPrmDlgPosition [ 516, 202, 1404, 859 ]
+ }
+ PropName "ConfigurationSets"
+ }
+ Simulink.ConfigSet {
+ $PropName "ActiveConfigurationSet"
+ $ObjectID 2
+ }
+ ExplicitPartitioning off
+ BlockDefaults {
+ ForegroundColor "black"
+ BackgroundColor "white"
+ DropShadow off
+ NamePlacement "normal"
+ FontName "Helvetica"
+ FontSize 10
+ FontWeight "normal"
+ FontAngle "normal"
+ ShowName on
+ BlockRotation 0
+ BlockMirror off
+ }
+ AnnotationDefaults {
+ HorizontalAlignment "center"
+ VerticalAlignment "middle"
+ ForegroundColor "black"
+ BackgroundColor "white"
+ DropShadow off
+ FontName "Helvetica"
+ FontSize 10
+ FontWeight "normal"
+ FontAngle "normal"
+ UseDisplayTextAsClickCallback off
+ }
+ LineDefaults {
+ FontName "Helvetica"
+ FontSize 9
+ FontWeight "normal"
+ FontAngle "normal"
+ }
+ BlockParameterDefaults {
+ Block {
+ BlockType Clock
+ DisplayTime off
+ Decimation "10"
+ }
+ Block {
+ BlockType Constant
+ Value "1"
+ VectorParams1D on
+ SamplingMode "Sample based"
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: Inherit from 'Constant value'"
+ LockScale off
+ SampleTime "inf"
+ FramePeriod "inf"
+ PreserveConstantTs off
+ }
+ Block {
+ BlockType Demux
+ Outputs "4"
+ DisplayOption "none"
+ BusSelectionMode off
+ }
+ Block {
+ BlockType Inport
+ Port "1"
+ OutputFunctionCall off
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: auto"
+ LockScale off
+ BusOutputAsStruct off
+ PortDimensions "-1"
+ VarSizeSig "Inherit"
+ SampleTime "-1"
+ SignalType "auto"
+ SamplingMode "auto"
+ LatchByDelayingOutsideSignal off
+ LatchInputForFeedbackSignals off
+ Interpolate on
+ }
+ Block {
+ BlockType Integrator
+ ExternalReset "none"
+ InitialConditionSource "internal"
+ InitialCondition "0"
+ LimitOutput off
+ UpperSaturationLimit "inf"
+ LowerSaturationLimit "-inf"
+ ShowSaturationPort off
+ ShowStatePort off
+ AbsoluteTolerance "auto"
+ IgnoreLimit off
+ ZeroCross on
+ ContinuousStateAttributes "''"
+ }
+ Block {
+ BlockType Outport
+ Port "1"
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: auto"
+ LockScale off
+ BusOutputAsStruct off
+ PortDimensions "-1"
+ VarSizeSig "Inherit"
+ SampleTime "-1"
+ SignalType "auto"
+ SamplingMode "auto"
+ SourceOfInitialOutputValue "Dialog"
+ OutputWhenDisabled "held"
+ InitialOutput "[]"
+ }
+ Block {
+ BlockType Product
+ Inputs "2"
+ Multiplication "Element-wise(.*)"
+ CollapseMode "All dimensions"
+ CollapseDim "1"
+ InputSameDT on
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: Same as first input"
+ LockScale off
+ RndMeth "Zero"
+ SaturateOnIntegerOverflow on
+ SampleTime "-1"
+ }
+ Block {
+ BlockType S-Function
+ FunctionName "system"
+ SFunctionModules "''"
+ PortCounts "[]"
+ SFunctionDeploymentMode off
+ }
+ Block {
+ BlockType SubSystem
+ ShowPortLabels "FromPortIcon"
+ Permissions "ReadWrite"
+ PermitHierarchicalResolution "All"
+ TreatAsAtomicUnit off
+ CheckFcnCallInpInsideContextMsg off
+ SystemSampleTime "-1"
+ RTWFcnNameOpts "Auto"
+ RTWFileNameOpts "Auto"
+ RTWMemSecFuncInitTerm "Inherit from model"
+ RTWMemSecFuncExecute "Inherit from model"
+ RTWMemSecDataConstants "Inherit from model"
+ RTWMemSecDataInternal "Inherit from model"
+ RTWMemSecDataParameters "Inherit from model"
+ SimViewingDevice off
+ DataTypeOverride "UseLocalSettings"
+ DataTypeOverrideAppliesTo "AllNumericTypes"
+ MinMaxOverflowLogging "UseLocalSettings"
+ SFBlockType "NONE"
+ Variant off
+ GeneratePreprocessorConditionals off
+ }
+ Block {
+ BlockType Terminator
+ }
+ Block {
+ BlockType ToWorkspace
+ VariableName "simulink_output"
+ MaxDataPoints "1000"
+ Decimation "1"
+ SampleTime "0"
+ SaveFormat "Array"
+ FixptAsFi off
+ NumInputs "1"
+ }
+ }
+ System {
+ Name "p5dennis2"
+ Location [1016, 309, 1664, 894]
+ Open on
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ ReportName "simulink-default.rpt"
+ SIDHighWatermark "17"
+ Block {
+ BlockType Clock
+ Name "Clock"
+ SID "14"
+ Position [85, 25, 105, 45]
+ ZOrder -4
+ }
+ Block {
+ BlockType Constant
+ Name "Constant"
+ SID "1"
+ Position [60, 115, 90, 145]
+ ZOrder -4
+ Value "x_start"
+ }
+ Block {
+ BlockType Constant
+ Name "Constant1"
+ SID "2"
+ Position [60, 310, 90, 340]
+ ZOrder -4
+ Value "y_start"
+ }
+ Block {
+ BlockType SubSystem
+ Name "Hauptfunktion f0"
+ SID "7"
+ Ports [3, 1]
+ Position [280, 186, 350, 234]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f0']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "Hauptfunktion f0"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "7::23"
+ Position [20, 101, 40, 119]
+ ZOrder 9
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "x"
+ SID "7::1"
+ Position [20, 136, 40, 154]
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "y"
+ SID "7::24"
+ Position [20, 171, 40, 189]
+ ZOrder 10
+ Port "3"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "7::20"
+ Ports [1, 1]
+ Position [270, 180, 320, 220]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "7::19"
+ Tag "Stateflow S-Function p5dennis2 2"
+ Ports [3, 2]
+ Position [180, 100, 230, 180]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[3 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "f0out"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "7::22"
+ Position [460, 191, 480, 209]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "f0out"
+ SID "7::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "x"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ SrcBlock "y"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 3
+ }
+ Line {
+ Name "f0out"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "f0out"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType Integrator
+ Name "Integrator X"
+ SID "12"
+ Ports [2, 1]
+ Position [165, 107, 195, 138]
+ ZOrder -2
+ InitialConditionSource "external"
+ }
+ Block {
+ BlockType Integrator
+ Name "Integrator Y"
+ SID "13"
+ Ports [2, 1]
+ Position [165, 302, 195, 333]
+ ZOrder -2
+ InitialConditionSource "external"
+ }
+ Block {
+ BlockType ToWorkspace
+ Name "X To Workspace"
+ SID "16"
+ Ports [1]
+ Position [135, 180, 195, 210]
+ ZOrder -7
+ VariableName "x_out"
+ MaxDataPoints "inf"
+ SampleTime "-1"
+ }
+ Block {
+ BlockType ToWorkspace
+ Name "Y To Workspace1"
+ SID "17"
+ Ports [1]
+ Position [135, 235, 195, 265]
+ ZOrder -7
+ VariableName "y_out"
+ MaxDataPoints "inf"
+ SampleTime "-1"
+ }
+ Block {
+ BlockType SubSystem
+ Name "nebenfunktion f1"
+ SID "8"
+ Ports [2, 1]
+ Position [280, 88, 350, 137]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f1']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "nebenfunktion f1"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "8::23"
+ Position [20, 101, 40, 119]
+ ZOrder 9
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "x"
+ SID "8::1"
+ Position [20, 136, 40, 154]
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "8::20"
+ Ports [1, 1]
+ Position [270, 180, 320, 220]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "8::19"
+ Tag "Stateflow S-Function p5dennis2 1"
+ Ports [2, 2]
+ Position [180, 100, 230, 180]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[2 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "f1out"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "8::22"
+ Position [460, 191, 480, 209]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "f1out"
+ SID "8::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "x"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ Name "f1out"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "f1out"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType SubSystem
+ Name "nebenfunktion f2"
+ SID "9"
+ Ports [2, 1]
+ Position [280, 283, 350, 332]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f2']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "nebenfunktion f2"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "9::23"
+ Position [20, 101, 40, 119]
+ ZOrder 9
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "y"
+ SID "9::1"
+ Position [20, 136, 40, 154]
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "9::20"
+ Ports [1, 1]
+ Position [270, 180, 320, 220]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "9::19"
+ Tag "Stateflow S-Function p5dennis2 3"
+ Ports [2, 2]
+ Position [180, 100, 230, 180]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[2 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "f2out"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "9::22"
+ Position [460, 191, 480, 209]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "f2out"
+ SID "9::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "y"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ Name "f2out"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "f2out"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType Product
+ Name "x prepariert"
+ SID "10"
+ Ports [2, 1]
+ Position [415, 127, 445, 158]
+ ZOrder -19
+ InputSameDT off
+ OutDataTypeStr "Inherit: Inherit via internal rule"
+ SaturateOnIntegerOverflow off
+ }
+ Block {
+ BlockType Product
+ Name "y prepariert"
+ SID "11"
+ Ports [2, 1]
+ Position [415, 242, 445, 273]
+ ZOrder -19
+ InputSameDT off
+ OutDataTypeStr "Inherit: Inherit via internal rule"
+ SaturateOnIntegerOverflow off
+ }
+ Line {
+ SrcBlock "Hauptfunktion f0"
+ SrcPort 1
+ Points [20, 0]
+ Branch {
+ Points [0, -60]
+ DstBlock "x prepariert"
+ DstPort 2
+ }
+ Branch {
+ Points [0, 40]
+ DstBlock "y prepariert"
+ DstPort 1
+ }
+ }
+ Line {
+ SrcBlock "nebenfunktion f1"
+ SrcPort 1
+ Points [20, 0; 0, 20]
+ DstBlock "x prepariert"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "nebenfunktion f2"
+ SrcPort 1
+ Points [20, 0; 0, -45]
+ DstBlock "y prepariert"
+ DstPort 2
+ }
+ Line {
+ SrcBlock "Constant"
+ SrcPort 1
+ DstBlock "Integrator X"
+ DstPort 2
+ }
+ Line {
+ SrcBlock "Constant1"
+ SrcPort 1
+ DstBlock "Integrator Y"
+ DstPort 2
+ }
+ Line {
+ SrcBlock "Integrator X"
+ SrcPort 1
+ Points [40, 0]
+ Branch {
+ DstBlock "nebenfunktion f1"
+ DstPort 2
+ }
+ Branch {
+ Points [-15, 0; 0, 45]
+ Branch {
+ Points [0, 40]
+ DstBlock "Hauptfunktion f0"
+ DstPort 2
+ }
+ Branch {
+ Points [-105, 0]
+ DstBlock "X To Workspace"
+ DstPort 1
+ }
+ }
+ }
+ Line {
+ SrcBlock "x prepariert"
+ SrcPort 1
+ Points [0, -75; -300, 0]
+ DstBlock "Integrator X"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "Integrator Y"
+ SrcPort 1
+ Points [35, 0]
+ Branch {
+ DstBlock "nebenfunktion f2"
+ DstPort 2
+ }
+ Branch {
+ Points [-10, 0; 0, -25]
+ Branch {
+ Points [0, -70]
+ DstBlock "Hauptfunktion f0"
+ DstPort 3
+ }
+ Branch {
+ Points [-105, 0]
+ DstBlock "Y To Workspace1"
+ DstPort 1
+ }
+ }
+ }
+ Line {
+ SrcBlock "y prepariert"
+ SrcPort 1
+ Points [10, 0; 0, 115; -315, 0; 0, -65]
+ DstBlock "Integrator Y"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "Clock"
+ SrcPort 1
+ Points [150, 0; 0, 65]
+ Branch {
+ DstBlock "nebenfunktion f1"
+ DstPort 1
+ }
+ Branch {
+ Points [0, 95]
+ Branch {
+ DstBlock "Hauptfunktion f0"
+ DstPort 1
+ }
+ Branch {
+ Points [0, 100]
+ DstBlock "nebenfunktion f2"
+ DstPort 1
+ }
+ }
+ }
+ }
+}
+# Finite State Machines
+#
+# Stateflow Version 7.6 (R2011b) dated Jan 25 2012, 13:50:40
+#
+#
+
+
+Stateflow {
+ machine {
+ id 1
+ name "p5dennis2"
+ created "06-Feb-2013 14:02:25"
+ isLibrary 0
+ firstTarget 27
+ sfVersion 76014001.00040001
+ }
+ chart {
+ id 2
+ name "nebenfunktion f1"
+ windowPosition [390.75 188.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 3 0 0]
+ firstTransition 5
+ firstJunction 4
+ viewObj 2
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 6
+ chartFileNumber 1
+ disableImplicitCasting 1
+ eml {
+ name "f1"
+ }
+ }
+ state {
+ id 3
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 2
+ treeNode [2 0 0 0]
+ superState SUBCHART
+ subviewer 2
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function f1out = f1(t,x)\n%#codegen\nf1out = x - 5*cos(t);"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 4
+ position [23.5747 49.5747 7]
+ chart 2
+ linkNode [2 0 0]
+ subviewer 2
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 5
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 4
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 2
+ linkNode [2 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 2
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 6
+ ssIdNumber 6
+ name "t"
+ linkNode [2 0 7]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 7
+ ssIdNumber 4
+ name "x"
+ linkNode [2 6 8]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 8
+ ssIdNumber 7
+ name "f1out"
+ linkNode [2 7 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 9
+ name "nebenfunktion f1"
+ machine 1
+ chart 2
+ }
+ chart {
+ id 10
+ name "Hauptfunktion f0"
+ windowPosition [375.75 203.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 11 0 0]
+ firstTransition 13
+ firstJunction 12
+ viewObj 10
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 14
+ chartFileNumber 2
+ disableImplicitCasting 1
+ eml {
+ name "f0"
+ }
+ }
+ state {
+ id 11
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 10
+ treeNode [10 0 0 0]
+ superState SUBCHART
+ subviewer 10
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function f0out = f0(t,x,y)\n%#codegen\nf0out = ( -5*sin(t) * (x-5*cos(t)) + 5*cos(t)*(y-5*sin(t))"
+ ") / (((x-5*cos(t))^2) + (y-5*sin(t))^2);"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 12
+ position [23.5747 49.5747 7]
+ chart 10
+ linkNode [10 0 0]
+ subviewer 10
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 13
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 12
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 10
+ linkNode [10 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 10
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 14
+ ssIdNumber 6
+ name "t"
+ linkNode [10 0 15]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 15
+ ssIdNumber 4
+ name "x"
+ linkNode [10 14 16]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 16
+ ssIdNumber 5
+ name "y"
+ linkNode [10 15 17]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 17
+ ssIdNumber 7
+ name "f0out"
+ linkNode [10 16 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 18
+ name "Hauptfunktion f0"
+ machine 1
+ chart 10
+ }
+ chart {
+ id 19
+ name "nebenfunktion f2"
+ windowPosition [405.75 173.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 20 0 0]
+ firstTransition 22
+ firstJunction 21
+ viewObj 19
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 23
+ chartFileNumber 3
+ disableImplicitCasting 1
+ eml {
+ name "f2"
+ }
+ }
+ state {
+ id 20
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 19
+ treeNode [19 0 0 0]
+ superState SUBCHART
+ subviewer 19
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function f2out = f2(t,y)\n%#codegen\nf2out = (y - 5*sin(t));"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 21
+ position [23.5747 49.5747 7]
+ chart 19
+ linkNode [19 0 0]
+ subviewer 19
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 22
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 21
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 19
+ linkNode [19 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 19
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 23
+ ssIdNumber 6
+ name "t"
+ linkNode [19 0 24]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 24
+ ssIdNumber 4
+ name "y"
+ linkNode [19 23 25]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 25
+ ssIdNumber 7
+ name "f2out"
+ linkNode [19 24 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 26
+ name "nebenfunktion f2"
+ machine 1
+ chart 19
+ }
+ target {
+ id 27
+ name "sfun"
+ description "Default Simulink S-Function Target."
+ machine 1
+ linkNode [1 0 0]
+ }
+}
diff --git a/ws2012/CE/uebungen/P5/LoesungDennis/P5Test-1.pdf b/ws2012/CE/uebungen/P5/LoesungDennis/P5Test-1.pdf
new file mode 100644
index 00000000..098fbb78
Binary files /dev/null and b/ws2012/CE/uebungen/P5/LoesungDennis/P5Test-1.pdf differ
diff --git a/ws2012/CE/uebungen/P5/LoesungDennis/P5Test-2.pdf b/ws2012/CE/uebungen/P5/LoesungDennis/P5Test-2.pdf
new file mode 100644
index 00000000..586f4f2d
Binary files /dev/null and b/ws2012/CE/uebungen/P5/LoesungDennis/P5Test-2.pdf differ
diff --git a/ws2012/CE/uebungen/P5/LoesungDennis/p5dennis2.mdl b/ws2012/CE/uebungen/P5/LoesungDennis/p5dennis2.mdl
new file mode 100644
index 00000000..283bd758
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/LoesungDennis/p5dennis2.mdl
@@ -0,0 +1,1900 @@
+Model {
+ Name "p5dennis2"
+ Version 7.9
+ MdlSubVersion 0
+ GraphicalInterface {
+ NumRootInports 0
+ NumRootOutports 0
+ ParameterArgumentNames ""
+ ComputedModelVersion "1.11"
+ NumModelReferences 0
+ NumTestPointedSignals 0
+ }
+ SavedCharacterEncoding "UTF-8"
+ SaveDefaultBlockParams on
+ ScopeRefreshTime 0.035000
+ OverrideScopeRefreshTime on
+ DisableAllScopes off
+ DataTypeOverride "UseLocalSettings"
+ DataTypeOverrideAppliesTo "AllNumericTypes"
+ MinMaxOverflowLogging "UseLocalSettings"
+ MinMaxOverflowArchiveMode "Overwrite"
+ FPTRunName "Run 1"
+ MaxMDLFileLineLength 120
+ Created "Wed Feb 06 14:00:13 2013"
+ Creator "d_werner"
+ UpdateHistory "UpdateHistoryNever"
+ ModifiedByFormat "%"
+ LastModifiedBy "d_werner"
+ ModifiedDateFormat "%"
+ LastModifiedDate "Wed Feb 06 14:55:29 2013"
+ RTWModifiedTimeStamp 282063327
+ ModelVersionFormat "1.%"
+ ConfigurationManager "None"
+ SampleTimeColors off
+ SampleTimeAnnotations off
+ LibraryLinkDisplay "disabled"
+ WideLines off
+ ShowLineDimensions off
+ ShowPortDataTypes off
+ ShowDesignRanges off
+ ShowLoopsOnError on
+ IgnoreBidirectionalLines off
+ ShowStorageClass off
+ ShowTestPointIcons on
+ ShowSignalResolutionIcons on
+ ShowViewerIcons on
+ SortedOrder off
+ ExecutionContextIcon off
+ ShowLinearizationAnnotations on
+ BlockNameDataTip off
+ BlockParametersDataTip off
+ BlockDescriptionStringDataTip off
+ ToolBar on
+ StatusBar on
+ BrowserShowLibraryLinks off
+ BrowserLookUnderMasks off
+ SimulationMode "normal"
+ LinearizationMsg "none"
+ Profile off
+ ParamWorkspaceSource "MATLABWorkspace"
+ AccelSystemTargetFile "accel.tlc"
+ AccelTemplateMakefile "accel_default_tmf"
+ AccelMakeCommand "make_rtw"
+ TryForcingSFcnDF off
+ Object {
+ $PropName "DataLoggingOverride"
+ $ObjectID 1
+ $ClassName "Simulink.SimulationData.ModelLoggingInfo"
+ model_ "p5dennis2"
+ overrideMode_ [0.0]
+ Array {
+ Type "Cell"
+ Dimension 1
+ Cell "p5dennis2"
+ PropName "logAsSpecifiedByModels_"
+ }
+ Array {
+ Type "Cell"
+ Dimension 0
+ PropName "logAsSpecifiedByModelsSSIDs_"
+ }
+ }
+ RecordCoverage off
+ CovPath "/"
+ CovSaveName "covdata"
+ CovMetricSettings "dw"
+ CovNameIncrementing off
+ CovHtmlReporting on
+ CovForceBlockReductionOff on
+ covSaveCumulativeToWorkspaceVar on
+ CovSaveSingleToWorkspaceVar on
+ CovCumulativeVarName "covCumulativeData"
+ CovCumulativeReport off
+ CovReportOnPause on
+ CovModelRefEnable "Off"
+ CovExternalEMLEnable off
+ ExtModeBatchMode off
+ ExtModeEnableFloating on
+ ExtModeTrigType "manual"
+ ExtModeTrigMode "normal"
+ ExtModeTrigPort "1"
+ ExtModeTrigElement "any"
+ ExtModeTrigDuration 1000
+ ExtModeTrigDurationFloating "auto"
+ ExtModeTrigHoldOff 0
+ ExtModeTrigDelay 0
+ ExtModeTrigDirection "rising"
+ ExtModeTrigLevel 0
+ ExtModeArchiveMode "off"
+ ExtModeAutoIncOneShot off
+ ExtModeIncDirWhenArm off
+ ExtModeAddSuffixToVar off
+ ExtModeWriteAllDataToWs off
+ ExtModeArmWhenConnect on
+ ExtModeSkipDownloadWhenConnect off
+ ExtModeLogAll on
+ ExtModeAutoUpdateStatusClock on
+ BufferReuse on
+ ShowModelReferenceBlockVersion off
+ ShowModelReferenceBlockIO off
+ Array {
+ Type "Handle"
+ Dimension 1
+ Simulink.ConfigSet {
+ $ObjectID 2
+ Version "1.12.0"
+ Array {
+ Type "Handle"
+ Dimension 8
+ Simulink.SolverCC {
+ $ObjectID 3
+ Version "1.12.0"
+ StartTime "0.0"
+ StopTime "100.0"
+ AbsTol "auto"
+ FixedStep "auto"
+ InitialStep "auto"
+ MaxNumMinSteps "-1"
+ MaxOrder 5
+ ZcThreshold "auto"
+ ConsecutiveZCsStepRelTol "10*128*eps"
+ MaxConsecutiveZCs "1000"
+ ExtrapolationOrder 4
+ NumberNewtonIterations 1
+ MaxStep "auto"
+ MinStep "auto"
+ MaxConsecutiveMinStep "1"
+ RelTol "1e-3"
+ SolverMode "Auto"
+ EnableConcurrentExecution off
+ ConcurrentTasks off
+ Solver "ode45"
+ SolverName "ode45"
+ SolverJacobianMethodControl "auto"
+ ShapePreserveControl "DisableAll"
+ ZeroCrossControl "UseLocalSettings"
+ ZeroCrossAlgorithm "Nonadaptive"
+ AlgebraicLoopSolver "TrustRegion"
+ SolverResetMethod "Fast"
+ PositivePriorityOrder off
+ AutoInsertRateTranBlk off
+ SampleTimeConstraint "Unconstrained"
+ InsertRTBMode "Whenever possible"
+ }
+ Simulink.DataIOCC {
+ $ObjectID 4
+ Version "1.12.0"
+ Decimation "1"
+ ExternalInput "[t, u]"
+ FinalStateName "xFinal"
+ InitialState "xInitial"
+ LimitDataPoints on
+ MaxDataPoints "1000"
+ LoadExternalInput off
+ LoadInitialState off
+ SaveFinalState off
+ SaveCompleteFinalSimState off
+ SaveFormat "Array"
+ SignalLoggingSaveFormat "ModelDataLogs"
+ SaveOutput on
+ SaveState off
+ SignalLogging on
+ DSMLogging on
+ InspectSignalLogs off
+ SaveTime on
+ ReturnWorkspaceOutputs off
+ StateSaveName "xout"
+ TimeSaveName "tout"
+ OutputSaveName "yout"
+ SignalLoggingName "logsout"
+ DSMLoggingName "dsmout"
+ OutputOption "RefineOutputTimes"
+ OutputTimes "[]"
+ ReturnWorkspaceOutputsName "out"
+ Refine "1"
+ }
+ Simulink.OptimizationCC {
+ $ObjectID 5
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 8
+ Cell "BooleansAsBitfields"
+ Cell "PassReuseOutputArgsAs"
+ Cell "PassReuseOutputArgsThreshold"
+ Cell "ZeroExternalMemoryAtStartup"
+ Cell "ZeroInternalMemoryAtStartup"
+ Cell "OptimizeModelRefInitCode"
+ Cell "NoFixptDivByZeroProtection"
+ Cell "UseSpecifiedMinMax"
+ PropName "DisabledProps"
+ }
+ BlockReduction on
+ BooleanDataType on
+ ConditionallyExecuteInputs on
+ InlineParams off
+ UseIntDivNetSlope off
+ UseFloatMulNetSlope off
+ UseSpecifiedMinMax off
+ InlineInvariantSignals off
+ OptimizeBlockIOStorage on
+ BufferReuse on
+ EnhancedBackFolding off
+ StrengthReduction off
+ ExpressionFolding on
+ BooleansAsBitfields off
+ BitfieldContainerType "uint_T"
+ EnableMemcpy on
+ MemcpyThreshold 64
+ PassReuseOutputArgsAs "Structure reference"
+ ExpressionDepthLimit 2147483647
+ FoldNonRolledExpr on
+ LocalBlockOutputs on
+ RollThreshold 5
+ SystemCodeInlineAuto off
+ StateBitsets off
+ DataBitsets off
+ UseTempVars off
+ ZeroExternalMemoryAtStartup on
+ ZeroInternalMemoryAtStartup on
+ InitFltsAndDblsToZero off
+ NoFixptDivByZeroProtection off
+ EfficientFloat2IntCast off
+ EfficientMapNaN2IntZero on
+ OptimizeModelRefInitCode off
+ LifeSpan "inf"
+ MaxStackSize "Inherit from target"
+ BufferReusableBoundary on
+ SimCompilerOptimization "Off"
+ AccelVerboseBuild off
+ ParallelExecutionInRapidAccelerator on
+ }
+ Simulink.DebuggingCC {
+ $ObjectID 6
+ Version "1.12.0"
+ RTPrefix "error"
+ ConsistencyChecking "none"
+ ArrayBoundsChecking "none"
+ SignalInfNanChecking "none"
+ SignalRangeChecking "none"
+ ReadBeforeWriteMsg "UseLocalSettings"
+ WriteAfterWriteMsg "UseLocalSettings"
+ WriteAfterReadMsg "UseLocalSettings"
+ AlgebraicLoopMsg "warning"
+ ArtificialAlgebraicLoopMsg "warning"
+ SaveWithDisabledLinksMsg "warning"
+ SaveWithParameterizedLinksMsg "warning"
+ CheckSSInitialOutputMsg on
+ UnderspecifiedInitializationDetection "Classic"
+ MergeDetectMultiDrivingBlocksExec "none"
+ CheckExecutionContextPreStartOutputMsg off
+ CheckExecutionContextRuntimeOutputMsg off
+ SignalResolutionControl "UseLocalSettings"
+ BlockPriorityViolationMsg "warning"
+ MinStepSizeMsg "warning"
+ TimeAdjustmentMsg "none"
+ MaxConsecutiveZCsMsg "error"
+ MaskedZcDiagnostic "warning"
+ IgnoredZcDiagnostic "warning"
+ SolverPrmCheckMsg "warning"
+ InheritedTsInSrcMsg "warning"
+ DiscreteInheritContinuousMsg "warning"
+ MultiTaskDSMMsg "error"
+ MultiTaskCondExecSysMsg "error"
+ MultiTaskRateTransMsg "error"
+ SingleTaskRateTransMsg "none"
+ TasksWithSamePriorityMsg "warning"
+ SigSpecEnsureSampleTimeMsg "warning"
+ CheckMatrixSingularityMsg "none"
+ IntegerOverflowMsg "warning"
+ Int32ToFloatConvMsg "warning"
+ ParameterDowncastMsg "error"
+ ParameterOverflowMsg "error"
+ ParameterUnderflowMsg "none"
+ ParameterPrecisionLossMsg "warning"
+ ParameterTunabilityLossMsg "warning"
+ FixptConstUnderflowMsg "none"
+ FixptConstOverflowMsg "none"
+ FixptConstPrecisionLossMsg "none"
+ UnderSpecifiedDataTypeMsg "none"
+ UnnecessaryDatatypeConvMsg "none"
+ VectorMatrixConversionMsg "none"
+ InvalidFcnCallConnMsg "error"
+ FcnCallInpInsideContextMsg "Enable All"
+ SignalLabelMismatchMsg "none"
+ UnconnectedInputMsg "warning"
+ UnconnectedOutputMsg "warning"
+ UnconnectedLineMsg "warning"
+ SFcnCompatibilityMsg "none"
+ FrameProcessingCompatibilityMsg "warning"
+ UniqueDataStoreMsg "none"
+ BusObjectLabelMismatch "warning"
+ RootOutportRequireBusObject "warning"
+ AssertControl "UseLocalSettings"
+ EnableOverflowDetection off
+ ModelReferenceIOMsg "none"
+ ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error"
+ ModelReferenceVersionMismatchMessage "none"
+ ModelReferenceIOMismatchMessage "none"
+ ModelReferenceCSMismatchMessage "none"
+ UnknownTsInhSupMsg "warning"
+ ModelReferenceDataLoggingMessage "warning"
+ ModelReferenceSymbolNameMessage "warning"
+ ModelReferenceExtraNoncontSigs "error"
+ StateNameClashWarn "warning"
+ SimStateInterfaceChecksumMismatchMsg "warning"
+ SimStateOlderReleaseMsg "error"
+ InitInArrayFormatMsg "warning"
+ StrictBusMsg "ErrorLevel1"
+ BusNameAdapt "WarnAndRepair"
+ NonBusSignalsTreatedAsBus "none"
+ LoggingUnavailableSignals "error"
+ BlockIODiagnostic "none"
+ SFUnusedDataAndEventsDiag "warning"
+ SFUnexpectedBacktrackingDiag "warning"
+ SFInvalidInputDataAccessInChartInitDiag "warning"
+ SFNoUnconditionalDefaultTransitionDiag "warning"
+ SFTransitionOutsideNaturalParentDiag "warning"
+ SFUnconditionalTransitionShadowingDiag "warning"
+ }
+ Simulink.HardwareCC {
+ $ObjectID 7
+ Version "1.12.0"
+ ProdBitPerChar 8
+ ProdBitPerShort 16
+ ProdBitPerInt 32
+ ProdBitPerLong 32
+ ProdBitPerFloat 32
+ ProdBitPerDouble 64
+ ProdBitPerPointer 32
+ ProdLargestAtomicInteger "Char"
+ ProdLargestAtomicFloat "None"
+ ProdIntDivRoundTo "Undefined"
+ ProdEndianess "Unspecified"
+ ProdWordSize 32
+ ProdShiftRightIntArith on
+ ProdHWDeviceType "32-bit Generic"
+ TargetBitPerChar 8
+ TargetBitPerShort 16
+ TargetBitPerInt 32
+ TargetBitPerLong 32
+ TargetBitPerFloat 32
+ TargetBitPerDouble 64
+ TargetBitPerPointer 32
+ TargetLargestAtomicInteger "Char"
+ TargetLargestAtomicFloat "None"
+ TargetShiftRightIntArith on
+ TargetIntDivRoundTo "Undefined"
+ TargetEndianess "Unspecified"
+ TargetWordSize 32
+ TargetTypeEmulationWarnSuppressLevel 0
+ TargetPreprocMaxBitsSint 32
+ TargetPreprocMaxBitsUint 32
+ TargetHWDeviceType "Specified"
+ TargetUnknown off
+ ProdEqTarget on
+ }
+ Simulink.ModelReferenceCC {
+ $ObjectID 8
+ Version "1.12.0"
+ UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
+ CheckModelReferenceTargetMessage "error"
+ EnableParallelModelReferenceBuilds off
+ ParallelModelReferenceErrorOnInvalidPool on
+ ParallelModelReferenceMATLABWorkerInit "None"
+ ModelReferenceNumInstancesAllowed "Multi"
+ PropagateVarSize "Infer from blocks in model"
+ ModelReferencePassRootInputsByReference on
+ ModelReferenceMinAlgLoopOccurrences off
+ PropagateSignalLabelsOutOfModel off
+ SupportModelReferenceSimTargetCustomCode off
+ }
+ Simulink.SFSimCC {
+ $ObjectID 9
+ Version "1.12.0"
+ SFSimEnableDebug on
+ SFSimOverflowDetection on
+ SFSimEcho on
+ SimBlas on
+ SimCtrlC on
+ SimExtrinsic on
+ SimIntegrity on
+ SimUseLocalCustomCode off
+ SimParseCustomCode on
+ SimBuildMode "sf_incremental_build"
+ }
+ Simulink.RTWCC {
+ $BackupClass "Simulink.RTWCC"
+ $ObjectID 10
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 9
+ Cell "IncludeHyperlinkInReport"
+ Cell "GenerateTraceInfo"
+ Cell "GenerateTraceReport"
+ Cell "GenerateTraceReportSl"
+ Cell "GenerateTraceReportSf"
+ Cell "GenerateTraceReportEml"
+ Cell "GenerateWebview"
+ Cell "GenerateCodeMetricsReport"
+ Cell "GenerateCodeReplacementReport"
+ PropName "DisabledProps"
+ }
+ SystemTargetFile "grt.tlc"
+ GenCodeOnly off
+ MakeCommand "make_rtw"
+ GenerateMakefile on
+ TemplateMakefile "grt_default_tmf"
+ GenerateReport off
+ SaveLog off
+ RTWVerbose on
+ RetainRTWFile off
+ ProfileTLC off
+ TLCDebug off
+ TLCCoverage off
+ TLCAssert off
+ ProcessScriptMode "Default"
+ ConfigurationMode "Optimized"
+ ConfigAtBuild off
+ RTWUseLocalCustomCode off
+ RTWUseSimCustomCode off
+ IncludeHyperlinkInReport off
+ LaunchReport off
+ TargetLang "C"
+ IncludeBusHierarchyInRTWFileBlockHierarchyMap off
+ IncludeERTFirstTime off
+ GenerateTraceInfo off
+ GenerateTraceReport off
+ GenerateTraceReportSl off
+ GenerateTraceReportSf off
+ GenerateTraceReportEml off
+ GenerateCodeInfo off
+ GenerateWebview off
+ GenerateCodeMetricsReport off
+ GenerateCodeReplacementReport off
+ RTWCompilerOptimization "Off"
+ CheckMdlBeforeBuild "Off"
+ CustomRebuildMode "OnUpdate"
+ Array {
+ Type "Handle"
+ Dimension 2
+ Simulink.CodeAppCC {
+ $ObjectID 11
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 21
+ Cell "IgnoreCustomStorageClasses"
+ Cell "IgnoreTestpoints"
+ Cell "InsertBlockDesc"
+ Cell "InsertPolySpaceComments"
+ Cell "SFDataObjDesc"
+ Cell "MATLABFcnDesc"
+ Cell "SimulinkDataObjDesc"
+ Cell "DefineNamingRule"
+ Cell "SignalNamingRule"
+ Cell "ParamNamingRule"
+ Cell "InlinedPrmAccess"
+ Cell "CustomSymbolStr"
+ Cell "CustomSymbolStrGlobalVar"
+ Cell "CustomSymbolStrType"
+ Cell "CustomSymbolStrField"
+ Cell "CustomSymbolStrFcn"
+ Cell "CustomSymbolStrFcnArg"
+ Cell "CustomSymbolStrBlkIO"
+ Cell "CustomSymbolStrTmpVar"
+ Cell "CustomSymbolStrMacro"
+ Cell "ReqsInCode"
+ PropName "DisabledProps"
+ }
+ ForceParamTrailComments off
+ GenerateComments on
+ IgnoreCustomStorageClasses on
+ IgnoreTestpoints off
+ IncHierarchyInIds off
+ MaxIdLength 31
+ PreserveName off
+ PreserveNameWithParent off
+ ShowEliminatedStatement off
+ IncAutoGenComments off
+ SimulinkDataObjDesc off
+ SFDataObjDesc off
+ MATLABFcnDesc off
+ IncDataTypeInIds off
+ MangleLength 1
+ CustomSymbolStrGlobalVar "$R$N$M"
+ CustomSymbolStrType "$N$R$M"
+ CustomSymbolStrField "$N$M"
+ CustomSymbolStrFcn "$R$N$M$F"
+ CustomSymbolStrFcnArg "rt$I$N$M"
+ CustomSymbolStrBlkIO "rtb_$N$M"
+ CustomSymbolStrTmpVar "$N$M"
+ CustomSymbolStrMacro "$R$N$M"
+ DefineNamingRule "None"
+ ParamNamingRule "None"
+ SignalNamingRule "None"
+ InsertBlockDesc off
+ InsertPolySpaceComments off
+ SimulinkBlockComments on
+ MATLABSourceComments off
+ EnableCustomComments off
+ InlinedPrmAccess "Literals"
+ ReqsInCode off
+ UseSimReservedNames off
+ }
+ Simulink.GRTTargetCC {
+ $BackupClass "Simulink.TargetCC"
+ $ObjectID 12
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 16
+ Cell "GeneratePreprocessorConditionals"
+ Cell "IncludeMdlTerminateFcn"
+ Cell "CombineOutputUpdateFcns"
+ Cell "SuppressErrorStatus"
+ Cell "ERTCustomFileBanners"
+ Cell "GenerateSampleERTMain"
+ Cell "GenerateTestInterfaces"
+ Cell "ModelStepFunctionPrototypeControlCompliant"
+ Cell "CPPClassGenCompliant"
+ Cell "MultiInstanceERTCode"
+ Cell "PurelyIntegerCode"
+ Cell "SupportComplex"
+ Cell "SupportAbsoluteTime"
+ Cell "SupportContinuousTime"
+ Cell "SupportNonInlinedSFcns"
+ Cell "PortableWordSizes"
+ PropName "DisabledProps"
+ }
+ TargetFcnLib "ansi_tfl_table_tmw.mat"
+ TargetLibSuffix ""
+ TargetPreCompLibLocation ""
+ CodeReplacementLibrary "ANSI_C"
+ UtilityFuncGeneration "Auto"
+ ERTMultiwordTypeDef "System defined"
+ CodeExecutionProfiling off
+ ERTMultiwordLength 256
+ MultiwordLength 2048
+ GenerateFullHeader on
+ GenerateSampleERTMain off
+ GenerateTestInterfaces off
+ IsPILTarget off
+ ModelReferenceCompliant on
+ ParMdlRefBuildCompliant on
+ CompOptLevelCompliant on
+ ConcurrentExecutionCompliant on
+ IncludeMdlTerminateFcn on
+ GeneratePreprocessorConditionals "Disable all"
+ CombineOutputUpdateFcns on
+ CombineSignalStateStructs off
+ SuppressErrorStatus off
+ ERTFirstTimeCompliant off
+ IncludeFileDelimiter "Auto"
+ ERTCustomFileBanners off
+ SupportAbsoluteTime on
+ LogVarNameModifier "rt_"
+ MatFileLogging on
+ MultiInstanceERTCode off
+ SupportNonFinite on
+ SupportComplex on
+ PurelyIntegerCode off
+ SupportContinuousTime on
+ SupportNonInlinedSFcns on
+ SupportVariableSizeSignals off
+ EnableShiftOperators on
+ ParenthesesLevel "Nominal"
+ PortableWordSizes off
+ ModelStepFunctionPrototypeControlCompliant off
+ CPPClassGenCompliant off
+ AutosarCompliant off
+ GRTInterface off
+ UseMalloc off
+ ExtMode off
+ ExtModeStaticAlloc off
+ ExtModeTesting off
+ ExtModeStaticAllocSize 1000000
+ ExtModeTransport 0
+ ExtModeMexFile "ext_comm"
+ ExtModeIntrfLevel "Level1"
+ RTWCAPISignals off
+ RTWCAPIParams off
+ RTWCAPIStates off
+ RTWCAPIRootIO off
+ GenerateASAP2 off
+ }
+ PropName "Components"
+ }
+ }
+ PropName "Components"
+ }
+ Name "Configuration"
+ CurrentDlgPage "Solver"
+ ConfigPrmDlgPosition [ 516, 202, 1404, 859 ]
+ }
+ PropName "ConfigurationSets"
+ }
+ Simulink.ConfigSet {
+ $PropName "ActiveConfigurationSet"
+ $ObjectID 2
+ }
+ ExplicitPartitioning off
+ BlockDefaults {
+ ForegroundColor "black"
+ BackgroundColor "white"
+ DropShadow off
+ NamePlacement "normal"
+ FontName "Helvetica"
+ FontSize 10
+ FontWeight "normal"
+ FontAngle "normal"
+ ShowName on
+ BlockRotation 0
+ BlockMirror off
+ }
+ AnnotationDefaults {
+ HorizontalAlignment "center"
+ VerticalAlignment "middle"
+ ForegroundColor "black"
+ BackgroundColor "white"
+ DropShadow off
+ FontName "Helvetica"
+ FontSize 10
+ FontWeight "normal"
+ FontAngle "normal"
+ UseDisplayTextAsClickCallback off
+ }
+ LineDefaults {
+ FontName "Helvetica"
+ FontSize 9
+ FontWeight "normal"
+ FontAngle "normal"
+ }
+ BlockParameterDefaults {
+ Block {
+ BlockType Clock
+ DisplayTime off
+ Decimation "10"
+ }
+ Block {
+ BlockType Constant
+ Value "1"
+ VectorParams1D on
+ SamplingMode "Sample based"
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: Inherit from 'Constant value'"
+ LockScale off
+ SampleTime "inf"
+ FramePeriod "inf"
+ PreserveConstantTs off
+ }
+ Block {
+ BlockType Demux
+ Outputs "4"
+ DisplayOption "none"
+ BusSelectionMode off
+ }
+ Block {
+ BlockType Inport
+ Port "1"
+ OutputFunctionCall off
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: auto"
+ LockScale off
+ BusOutputAsStruct off
+ PortDimensions "-1"
+ VarSizeSig "Inherit"
+ SampleTime "-1"
+ SignalType "auto"
+ SamplingMode "auto"
+ LatchByDelayingOutsideSignal off
+ LatchInputForFeedbackSignals off
+ Interpolate on
+ }
+ Block {
+ BlockType Integrator
+ ExternalReset "none"
+ InitialConditionSource "internal"
+ InitialCondition "0"
+ LimitOutput off
+ UpperSaturationLimit "inf"
+ LowerSaturationLimit "-inf"
+ ShowSaturationPort off
+ ShowStatePort off
+ AbsoluteTolerance "auto"
+ IgnoreLimit off
+ ZeroCross on
+ ContinuousStateAttributes "''"
+ }
+ Block {
+ BlockType Outport
+ Port "1"
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: auto"
+ LockScale off
+ BusOutputAsStruct off
+ PortDimensions "-1"
+ VarSizeSig "Inherit"
+ SampleTime "-1"
+ SignalType "auto"
+ SamplingMode "auto"
+ SourceOfInitialOutputValue "Dialog"
+ OutputWhenDisabled "held"
+ InitialOutput "[]"
+ }
+ Block {
+ BlockType Product
+ Inputs "2"
+ Multiplication "Element-wise(.*)"
+ CollapseMode "All dimensions"
+ CollapseDim "1"
+ InputSameDT on
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: Same as first input"
+ LockScale off
+ RndMeth "Zero"
+ SaturateOnIntegerOverflow on
+ SampleTime "-1"
+ }
+ Block {
+ BlockType S-Function
+ FunctionName "system"
+ SFunctionModules "''"
+ PortCounts "[]"
+ SFunctionDeploymentMode off
+ }
+ Block {
+ BlockType SubSystem
+ ShowPortLabels "FromPortIcon"
+ Permissions "ReadWrite"
+ PermitHierarchicalResolution "All"
+ TreatAsAtomicUnit off
+ CheckFcnCallInpInsideContextMsg off
+ SystemSampleTime "-1"
+ RTWFcnNameOpts "Auto"
+ RTWFileNameOpts "Auto"
+ RTWMemSecFuncInitTerm "Inherit from model"
+ RTWMemSecFuncExecute "Inherit from model"
+ RTWMemSecDataConstants "Inherit from model"
+ RTWMemSecDataInternal "Inherit from model"
+ RTWMemSecDataParameters "Inherit from model"
+ SimViewingDevice off
+ DataTypeOverride "UseLocalSettings"
+ DataTypeOverrideAppliesTo "AllNumericTypes"
+ MinMaxOverflowLogging "UseLocalSettings"
+ SFBlockType "NONE"
+ Variant off
+ GeneratePreprocessorConditionals off
+ }
+ Block {
+ BlockType Terminator
+ }
+ Block {
+ BlockType ToWorkspace
+ VariableName "simulink_output"
+ MaxDataPoints "1000"
+ Decimation "1"
+ SampleTime "0"
+ SaveFormat "Array"
+ FixptAsFi off
+ NumInputs "1"
+ }
+ }
+ System {
+ Name "p5dennis2"
+ Location [1016, 309, 1664, 894]
+ Open on
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ ReportName "simulink-default.rpt"
+ SIDHighWatermark "17"
+ Block {
+ BlockType Clock
+ Name "Clock"
+ SID "14"
+ Position [85, 25, 105, 45]
+ ZOrder -4
+ }
+ Block {
+ BlockType Constant
+ Name "Constant"
+ SID "1"
+ Position [60, 115, 90, 145]
+ ZOrder -4
+ Value "x_start"
+ }
+ Block {
+ BlockType Constant
+ Name "Constant1"
+ SID "2"
+ Position [60, 310, 90, 340]
+ ZOrder -4
+ Value "y_start"
+ }
+ Block {
+ BlockType SubSystem
+ Name "Hauptfunktion f0"
+ SID "7"
+ Ports [3, 1]
+ Position [280, 186, 350, 234]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f0']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "Hauptfunktion f0"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "7::23"
+ Position [20, 101, 40, 119]
+ ZOrder 9
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "x"
+ SID "7::1"
+ Position [20, 136, 40, 154]
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "y"
+ SID "7::24"
+ Position [20, 171, 40, 189]
+ ZOrder 10
+ Port "3"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "7::20"
+ Ports [1, 1]
+ Position [270, 180, 320, 220]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "7::19"
+ Tag "Stateflow S-Function p5dennis2 2"
+ Ports [3, 2]
+ Position [180, 100, 230, 180]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[3 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "f0out"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "7::22"
+ Position [460, 191, 480, 209]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "f0out"
+ SID "7::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "x"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ SrcBlock "y"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 3
+ }
+ Line {
+ Name "f0out"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "f0out"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType Integrator
+ Name "Integrator X"
+ SID "12"
+ Ports [2, 1]
+ Position [165, 107, 195, 138]
+ ZOrder -2
+ InitialConditionSource "external"
+ }
+ Block {
+ BlockType Integrator
+ Name "Integrator Y"
+ SID "13"
+ Ports [2, 1]
+ Position [165, 302, 195, 333]
+ ZOrder -2
+ InitialConditionSource "external"
+ }
+ Block {
+ BlockType ToWorkspace
+ Name "X To Workspace"
+ SID "16"
+ Ports [1]
+ Position [135, 180, 195, 210]
+ ZOrder -7
+ VariableName "x_out"
+ MaxDataPoints "inf"
+ SampleTime "-1"
+ }
+ Block {
+ BlockType ToWorkspace
+ Name "Y To Workspace1"
+ SID "17"
+ Ports [1]
+ Position [135, 235, 195, 265]
+ ZOrder -7
+ VariableName "y_out"
+ MaxDataPoints "inf"
+ SampleTime "-1"
+ }
+ Block {
+ BlockType SubSystem
+ Name "nebenfunktion f1"
+ SID "8"
+ Ports [2, 1]
+ Position [280, 88, 350, 137]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f1']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "nebenfunktion f1"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "8::23"
+ Position [20, 101, 40, 119]
+ ZOrder 9
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "x"
+ SID "8::1"
+ Position [20, 136, 40, 154]
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "8::20"
+ Ports [1, 1]
+ Position [270, 180, 320, 220]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "8::19"
+ Tag "Stateflow S-Function p5dennis2 1"
+ Ports [2, 2]
+ Position [180, 100, 230, 180]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[2 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "f1out"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "8::22"
+ Position [460, 191, 480, 209]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "f1out"
+ SID "8::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "x"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ Name "f1out"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "f1out"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType SubSystem
+ Name "nebenfunktion f2"
+ SID "9"
+ Ports [2, 1]
+ Position [280, 283, 350, 332]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f2']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "nebenfunktion f2"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "9::23"
+ Position [20, 101, 40, 119]
+ ZOrder 9
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "y"
+ SID "9::1"
+ Position [20, 136, 40, 154]
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "9::20"
+ Ports [1, 1]
+ Position [270, 180, 320, 220]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "9::19"
+ Tag "Stateflow S-Function p5dennis2 3"
+ Ports [2, 2]
+ Position [180, 100, 230, 180]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[2 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "f2out"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "9::22"
+ Position [460, 191, 480, 209]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "f2out"
+ SID "9::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "y"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ Name "f2out"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "f2out"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType Product
+ Name "x prepariert"
+ SID "10"
+ Ports [2, 1]
+ Position [415, 127, 445, 158]
+ ZOrder -19
+ InputSameDT off
+ OutDataTypeStr "Inherit: Inherit via internal rule"
+ SaturateOnIntegerOverflow off
+ }
+ Block {
+ BlockType Product
+ Name "y prepariert"
+ SID "11"
+ Ports [2, 1]
+ Position [415, 242, 445, 273]
+ ZOrder -19
+ InputSameDT off
+ OutDataTypeStr "Inherit: Inherit via internal rule"
+ SaturateOnIntegerOverflow off
+ }
+ Line {
+ SrcBlock "Hauptfunktion f0"
+ SrcPort 1
+ Points [20, 0]
+ Branch {
+ Points [0, -60]
+ DstBlock "x prepariert"
+ DstPort 2
+ }
+ Branch {
+ Points [0, 40]
+ DstBlock "y prepariert"
+ DstPort 1
+ }
+ }
+ Line {
+ SrcBlock "nebenfunktion f1"
+ SrcPort 1
+ Points [20, 0; 0, 20]
+ DstBlock "x prepariert"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "nebenfunktion f2"
+ SrcPort 1
+ Points [20, 0; 0, -45]
+ DstBlock "y prepariert"
+ DstPort 2
+ }
+ Line {
+ SrcBlock "Constant"
+ SrcPort 1
+ DstBlock "Integrator X"
+ DstPort 2
+ }
+ Line {
+ SrcBlock "Constant1"
+ SrcPort 1
+ DstBlock "Integrator Y"
+ DstPort 2
+ }
+ Line {
+ SrcBlock "Integrator X"
+ SrcPort 1
+ Points [40, 0]
+ Branch {
+ DstBlock "nebenfunktion f1"
+ DstPort 2
+ }
+ Branch {
+ Points [-15, 0; 0, 45]
+ Branch {
+ Points [0, 40]
+ DstBlock "Hauptfunktion f0"
+ DstPort 2
+ }
+ Branch {
+ Points [-105, 0]
+ DstBlock "X To Workspace"
+ DstPort 1
+ }
+ }
+ }
+ Line {
+ SrcBlock "x prepariert"
+ SrcPort 1
+ Points [0, -75; -300, 0]
+ DstBlock "Integrator X"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "Integrator Y"
+ SrcPort 1
+ Points [35, 0]
+ Branch {
+ DstBlock "nebenfunktion f2"
+ DstPort 2
+ }
+ Branch {
+ Points [-10, 0; 0, -25]
+ Branch {
+ Points [0, -70]
+ DstBlock "Hauptfunktion f0"
+ DstPort 3
+ }
+ Branch {
+ Points [-105, 0]
+ DstBlock "Y To Workspace1"
+ DstPort 1
+ }
+ }
+ }
+ Line {
+ SrcBlock "y prepariert"
+ SrcPort 1
+ Points [10, 0; 0, 115; -315, 0; 0, -65]
+ DstBlock "Integrator Y"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "Clock"
+ SrcPort 1
+ Points [150, 0; 0, 65]
+ Branch {
+ DstBlock "nebenfunktion f1"
+ DstPort 1
+ }
+ Branch {
+ Points [0, 95]
+ Branch {
+ DstBlock "Hauptfunktion f0"
+ DstPort 1
+ }
+ Branch {
+ Points [0, 100]
+ DstBlock "nebenfunktion f2"
+ DstPort 1
+ }
+ }
+ }
+ }
+}
+# Finite State Machines
+#
+# Stateflow Version 7.6 (R2011b) dated Jan 25 2012, 13:50:40
+#
+#
+
+
+Stateflow {
+ machine {
+ id 1
+ name "p5dennis2"
+ created "06-Feb-2013 14:02:25"
+ isLibrary 0
+ firstTarget 27
+ sfVersion 76014001.00040001
+ }
+ chart {
+ id 2
+ name "nebenfunktion f1"
+ windowPosition [390.75 188.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 3 0 0]
+ firstTransition 5
+ firstJunction 4
+ viewObj 2
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 6
+ chartFileNumber 1
+ disableImplicitCasting 1
+ eml {
+ name "f1"
+ }
+ }
+ state {
+ id 3
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 2
+ treeNode [2 0 0 0]
+ superState SUBCHART
+ subviewer 2
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function f1out = f1(t,x)\n%#codegen\nf1out = x - 5*cos(t);"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 4
+ position [23.5747 49.5747 7]
+ chart 2
+ linkNode [2 0 0]
+ subviewer 2
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 5
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 4
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 2
+ linkNode [2 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 2
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 6
+ ssIdNumber 6
+ name "t"
+ linkNode [2 0 7]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 7
+ ssIdNumber 4
+ name "x"
+ linkNode [2 6 8]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 8
+ ssIdNumber 7
+ name "f1out"
+ linkNode [2 7 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 9
+ name "nebenfunktion f1"
+ machine 1
+ chart 2
+ }
+ chart {
+ id 10
+ name "Hauptfunktion f0"
+ windowPosition [375.75 203.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 11 0 0]
+ firstTransition 13
+ firstJunction 12
+ viewObj 10
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 14
+ chartFileNumber 2
+ disableImplicitCasting 1
+ eml {
+ name "f0"
+ }
+ }
+ state {
+ id 11
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 10
+ treeNode [10 0 0 0]
+ superState SUBCHART
+ subviewer 10
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function f0out = f0(t,x,y)\n%#codegen\nf0out = ( -5*sin(t) * (x-5*cos(t)) + 5*cos(t)*(y-5*sin(t))"
+ ") / (((x-5*cos(t))^2) + (y-5*sin(t))^2);"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 12
+ position [23.5747 49.5747 7]
+ chart 10
+ linkNode [10 0 0]
+ subviewer 10
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 13
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 12
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 10
+ linkNode [10 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 10
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 14
+ ssIdNumber 6
+ name "t"
+ linkNode [10 0 15]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 15
+ ssIdNumber 4
+ name "x"
+ linkNode [10 14 16]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 16
+ ssIdNumber 5
+ name "y"
+ linkNode [10 15 17]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 17
+ ssIdNumber 7
+ name "f0out"
+ linkNode [10 16 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 18
+ name "Hauptfunktion f0"
+ machine 1
+ chart 10
+ }
+ chart {
+ id 19
+ name "nebenfunktion f2"
+ windowPosition [405.75 173.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 20 0 0]
+ firstTransition 22
+ firstJunction 21
+ viewObj 19
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 23
+ chartFileNumber 3
+ disableImplicitCasting 1
+ eml {
+ name "f2"
+ }
+ }
+ state {
+ id 20
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 19
+ treeNode [19 0 0 0]
+ superState SUBCHART
+ subviewer 19
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function f2out = f2(t,y)\n%#codegen\nf2out = (y - 5*sin(t));"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 21
+ position [23.5747 49.5747 7]
+ chart 19
+ linkNode [19 0 0]
+ subviewer 19
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 22
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 21
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 19
+ linkNode [19 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 19
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 23
+ ssIdNumber 6
+ name "t"
+ linkNode [19 0 24]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 24
+ ssIdNumber 4
+ name "y"
+ linkNode [19 23 25]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 25
+ ssIdNumber 7
+ name "f2out"
+ linkNode [19 24 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 26
+ name "nebenfunktion f2"
+ machine 1
+ chart 19
+ }
+ target {
+ id 27
+ name "sfun"
+ description "Default Simulink S-Function Target."
+ machine 1
+ linkNode [1 0 0]
+ }
+}
diff --git a/ws2012/CE/uebungen/P5/LoesungFinal/DK64_DW09_MS30.zip b/ws2012/CE/uebungen/P5/LoesungFinal/DK64_DW09_MS30.zip
new file mode 100644
index 00000000..78631543
Binary files /dev/null and b/ws2012/CE/uebungen/P5/LoesungFinal/DK64_DW09_MS30.zip differ
diff --git a/ws2012/CE/uebungen/P5/LoesungFinal/GraphP5.m b/ws2012/CE/uebungen/P5/LoesungFinal/GraphP5.m
new file mode 100644
index 00000000..6576c030
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/LoesungFinal/GraphP5.m
@@ -0,0 +1,34 @@
+function GraphP5()
+%GRAPHP5 Summary of this function goes here
+% Detailed explanation goes here
+
+
+ %Figur 1
+ assignin('base', 'x_start', 10);
+ assignin('base', 'y_start', 0);
+ sim('P5');
+ figure(1);
+ plot(x_out, y_out);
+ title('x0=10, y0=0');
+ axis manual;
+ axis([-20 20 -20 20]);
+
+
+ print -painters -dpdf -r600 P5Test-1.pdf;
+
+
+ % Figur 2
+ assignin('base', 'x_start', 0);
+ assignin('base', 'y_start', 10);
+ sim('P5');
+ figure(2);
+ plot(x_out, y_out);
+ title('x0=0, y0=10');
+ axis manual;
+ axis([-20 20 -20 20]);
+
+
+ print -painters -dpdf -r600 P5Test-2.pdf
+
+end
+
diff --git a/ws2012/CE/uebungen/P5/LoesungFinal/Gruppe & Matrikelnummern.txt b/ws2012/CE/uebungen/P5/LoesungFinal/Gruppe & Matrikelnummern.txt
new file mode 100644
index 00000000..0190b1ec
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/LoesungFinal/Gruppe & Matrikelnummern.txt
@@ -0,0 +1,6 @@
+Gruppe:
+ - Michael Scholz (Matr.# 1576630)
+ - David Kaufmann (Matr.# 1481864)
+ - Dennis Werner (Matr.# 1513509)
+
+Wir haben als Zusatz ein pdf (P5Test-1_BIG.pdf) mit einer besseren Zoomstufe hinzugelegt :)
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/LoesungFinal/P5.mdl b/ws2012/CE/uebungen/P5/LoesungFinal/P5.mdl
new file mode 100644
index 00000000..283bd758
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/LoesungFinal/P5.mdl
@@ -0,0 +1,1900 @@
+Model {
+ Name "p5dennis2"
+ Version 7.9
+ MdlSubVersion 0
+ GraphicalInterface {
+ NumRootInports 0
+ NumRootOutports 0
+ ParameterArgumentNames ""
+ ComputedModelVersion "1.11"
+ NumModelReferences 0
+ NumTestPointedSignals 0
+ }
+ SavedCharacterEncoding "UTF-8"
+ SaveDefaultBlockParams on
+ ScopeRefreshTime 0.035000
+ OverrideScopeRefreshTime on
+ DisableAllScopes off
+ DataTypeOverride "UseLocalSettings"
+ DataTypeOverrideAppliesTo "AllNumericTypes"
+ MinMaxOverflowLogging "UseLocalSettings"
+ MinMaxOverflowArchiveMode "Overwrite"
+ FPTRunName "Run 1"
+ MaxMDLFileLineLength 120
+ Created "Wed Feb 06 14:00:13 2013"
+ Creator "d_werner"
+ UpdateHistory "UpdateHistoryNever"
+ ModifiedByFormat "%"
+ LastModifiedBy "d_werner"
+ ModifiedDateFormat "%"
+ LastModifiedDate "Wed Feb 06 14:55:29 2013"
+ RTWModifiedTimeStamp 282063327
+ ModelVersionFormat "1.%"
+ ConfigurationManager "None"
+ SampleTimeColors off
+ SampleTimeAnnotations off
+ LibraryLinkDisplay "disabled"
+ WideLines off
+ ShowLineDimensions off
+ ShowPortDataTypes off
+ ShowDesignRanges off
+ ShowLoopsOnError on
+ IgnoreBidirectionalLines off
+ ShowStorageClass off
+ ShowTestPointIcons on
+ ShowSignalResolutionIcons on
+ ShowViewerIcons on
+ SortedOrder off
+ ExecutionContextIcon off
+ ShowLinearizationAnnotations on
+ BlockNameDataTip off
+ BlockParametersDataTip off
+ BlockDescriptionStringDataTip off
+ ToolBar on
+ StatusBar on
+ BrowserShowLibraryLinks off
+ BrowserLookUnderMasks off
+ SimulationMode "normal"
+ LinearizationMsg "none"
+ Profile off
+ ParamWorkspaceSource "MATLABWorkspace"
+ AccelSystemTargetFile "accel.tlc"
+ AccelTemplateMakefile "accel_default_tmf"
+ AccelMakeCommand "make_rtw"
+ TryForcingSFcnDF off
+ Object {
+ $PropName "DataLoggingOverride"
+ $ObjectID 1
+ $ClassName "Simulink.SimulationData.ModelLoggingInfo"
+ model_ "p5dennis2"
+ overrideMode_ [0.0]
+ Array {
+ Type "Cell"
+ Dimension 1
+ Cell "p5dennis2"
+ PropName "logAsSpecifiedByModels_"
+ }
+ Array {
+ Type "Cell"
+ Dimension 0
+ PropName "logAsSpecifiedByModelsSSIDs_"
+ }
+ }
+ RecordCoverage off
+ CovPath "/"
+ CovSaveName "covdata"
+ CovMetricSettings "dw"
+ CovNameIncrementing off
+ CovHtmlReporting on
+ CovForceBlockReductionOff on
+ covSaveCumulativeToWorkspaceVar on
+ CovSaveSingleToWorkspaceVar on
+ CovCumulativeVarName "covCumulativeData"
+ CovCumulativeReport off
+ CovReportOnPause on
+ CovModelRefEnable "Off"
+ CovExternalEMLEnable off
+ ExtModeBatchMode off
+ ExtModeEnableFloating on
+ ExtModeTrigType "manual"
+ ExtModeTrigMode "normal"
+ ExtModeTrigPort "1"
+ ExtModeTrigElement "any"
+ ExtModeTrigDuration 1000
+ ExtModeTrigDurationFloating "auto"
+ ExtModeTrigHoldOff 0
+ ExtModeTrigDelay 0
+ ExtModeTrigDirection "rising"
+ ExtModeTrigLevel 0
+ ExtModeArchiveMode "off"
+ ExtModeAutoIncOneShot off
+ ExtModeIncDirWhenArm off
+ ExtModeAddSuffixToVar off
+ ExtModeWriteAllDataToWs off
+ ExtModeArmWhenConnect on
+ ExtModeSkipDownloadWhenConnect off
+ ExtModeLogAll on
+ ExtModeAutoUpdateStatusClock on
+ BufferReuse on
+ ShowModelReferenceBlockVersion off
+ ShowModelReferenceBlockIO off
+ Array {
+ Type "Handle"
+ Dimension 1
+ Simulink.ConfigSet {
+ $ObjectID 2
+ Version "1.12.0"
+ Array {
+ Type "Handle"
+ Dimension 8
+ Simulink.SolverCC {
+ $ObjectID 3
+ Version "1.12.0"
+ StartTime "0.0"
+ StopTime "100.0"
+ AbsTol "auto"
+ FixedStep "auto"
+ InitialStep "auto"
+ MaxNumMinSteps "-1"
+ MaxOrder 5
+ ZcThreshold "auto"
+ ConsecutiveZCsStepRelTol "10*128*eps"
+ MaxConsecutiveZCs "1000"
+ ExtrapolationOrder 4
+ NumberNewtonIterations 1
+ MaxStep "auto"
+ MinStep "auto"
+ MaxConsecutiveMinStep "1"
+ RelTol "1e-3"
+ SolverMode "Auto"
+ EnableConcurrentExecution off
+ ConcurrentTasks off
+ Solver "ode45"
+ SolverName "ode45"
+ SolverJacobianMethodControl "auto"
+ ShapePreserveControl "DisableAll"
+ ZeroCrossControl "UseLocalSettings"
+ ZeroCrossAlgorithm "Nonadaptive"
+ AlgebraicLoopSolver "TrustRegion"
+ SolverResetMethod "Fast"
+ PositivePriorityOrder off
+ AutoInsertRateTranBlk off
+ SampleTimeConstraint "Unconstrained"
+ InsertRTBMode "Whenever possible"
+ }
+ Simulink.DataIOCC {
+ $ObjectID 4
+ Version "1.12.0"
+ Decimation "1"
+ ExternalInput "[t, u]"
+ FinalStateName "xFinal"
+ InitialState "xInitial"
+ LimitDataPoints on
+ MaxDataPoints "1000"
+ LoadExternalInput off
+ LoadInitialState off
+ SaveFinalState off
+ SaveCompleteFinalSimState off
+ SaveFormat "Array"
+ SignalLoggingSaveFormat "ModelDataLogs"
+ SaveOutput on
+ SaveState off
+ SignalLogging on
+ DSMLogging on
+ InspectSignalLogs off
+ SaveTime on
+ ReturnWorkspaceOutputs off
+ StateSaveName "xout"
+ TimeSaveName "tout"
+ OutputSaveName "yout"
+ SignalLoggingName "logsout"
+ DSMLoggingName "dsmout"
+ OutputOption "RefineOutputTimes"
+ OutputTimes "[]"
+ ReturnWorkspaceOutputsName "out"
+ Refine "1"
+ }
+ Simulink.OptimizationCC {
+ $ObjectID 5
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 8
+ Cell "BooleansAsBitfields"
+ Cell "PassReuseOutputArgsAs"
+ Cell "PassReuseOutputArgsThreshold"
+ Cell "ZeroExternalMemoryAtStartup"
+ Cell "ZeroInternalMemoryAtStartup"
+ Cell "OptimizeModelRefInitCode"
+ Cell "NoFixptDivByZeroProtection"
+ Cell "UseSpecifiedMinMax"
+ PropName "DisabledProps"
+ }
+ BlockReduction on
+ BooleanDataType on
+ ConditionallyExecuteInputs on
+ InlineParams off
+ UseIntDivNetSlope off
+ UseFloatMulNetSlope off
+ UseSpecifiedMinMax off
+ InlineInvariantSignals off
+ OptimizeBlockIOStorage on
+ BufferReuse on
+ EnhancedBackFolding off
+ StrengthReduction off
+ ExpressionFolding on
+ BooleansAsBitfields off
+ BitfieldContainerType "uint_T"
+ EnableMemcpy on
+ MemcpyThreshold 64
+ PassReuseOutputArgsAs "Structure reference"
+ ExpressionDepthLimit 2147483647
+ FoldNonRolledExpr on
+ LocalBlockOutputs on
+ RollThreshold 5
+ SystemCodeInlineAuto off
+ StateBitsets off
+ DataBitsets off
+ UseTempVars off
+ ZeroExternalMemoryAtStartup on
+ ZeroInternalMemoryAtStartup on
+ InitFltsAndDblsToZero off
+ NoFixptDivByZeroProtection off
+ EfficientFloat2IntCast off
+ EfficientMapNaN2IntZero on
+ OptimizeModelRefInitCode off
+ LifeSpan "inf"
+ MaxStackSize "Inherit from target"
+ BufferReusableBoundary on
+ SimCompilerOptimization "Off"
+ AccelVerboseBuild off
+ ParallelExecutionInRapidAccelerator on
+ }
+ Simulink.DebuggingCC {
+ $ObjectID 6
+ Version "1.12.0"
+ RTPrefix "error"
+ ConsistencyChecking "none"
+ ArrayBoundsChecking "none"
+ SignalInfNanChecking "none"
+ SignalRangeChecking "none"
+ ReadBeforeWriteMsg "UseLocalSettings"
+ WriteAfterWriteMsg "UseLocalSettings"
+ WriteAfterReadMsg "UseLocalSettings"
+ AlgebraicLoopMsg "warning"
+ ArtificialAlgebraicLoopMsg "warning"
+ SaveWithDisabledLinksMsg "warning"
+ SaveWithParameterizedLinksMsg "warning"
+ CheckSSInitialOutputMsg on
+ UnderspecifiedInitializationDetection "Classic"
+ MergeDetectMultiDrivingBlocksExec "none"
+ CheckExecutionContextPreStartOutputMsg off
+ CheckExecutionContextRuntimeOutputMsg off
+ SignalResolutionControl "UseLocalSettings"
+ BlockPriorityViolationMsg "warning"
+ MinStepSizeMsg "warning"
+ TimeAdjustmentMsg "none"
+ MaxConsecutiveZCsMsg "error"
+ MaskedZcDiagnostic "warning"
+ IgnoredZcDiagnostic "warning"
+ SolverPrmCheckMsg "warning"
+ InheritedTsInSrcMsg "warning"
+ DiscreteInheritContinuousMsg "warning"
+ MultiTaskDSMMsg "error"
+ MultiTaskCondExecSysMsg "error"
+ MultiTaskRateTransMsg "error"
+ SingleTaskRateTransMsg "none"
+ TasksWithSamePriorityMsg "warning"
+ SigSpecEnsureSampleTimeMsg "warning"
+ CheckMatrixSingularityMsg "none"
+ IntegerOverflowMsg "warning"
+ Int32ToFloatConvMsg "warning"
+ ParameterDowncastMsg "error"
+ ParameterOverflowMsg "error"
+ ParameterUnderflowMsg "none"
+ ParameterPrecisionLossMsg "warning"
+ ParameterTunabilityLossMsg "warning"
+ FixptConstUnderflowMsg "none"
+ FixptConstOverflowMsg "none"
+ FixptConstPrecisionLossMsg "none"
+ UnderSpecifiedDataTypeMsg "none"
+ UnnecessaryDatatypeConvMsg "none"
+ VectorMatrixConversionMsg "none"
+ InvalidFcnCallConnMsg "error"
+ FcnCallInpInsideContextMsg "Enable All"
+ SignalLabelMismatchMsg "none"
+ UnconnectedInputMsg "warning"
+ UnconnectedOutputMsg "warning"
+ UnconnectedLineMsg "warning"
+ SFcnCompatibilityMsg "none"
+ FrameProcessingCompatibilityMsg "warning"
+ UniqueDataStoreMsg "none"
+ BusObjectLabelMismatch "warning"
+ RootOutportRequireBusObject "warning"
+ AssertControl "UseLocalSettings"
+ EnableOverflowDetection off
+ ModelReferenceIOMsg "none"
+ ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error"
+ ModelReferenceVersionMismatchMessage "none"
+ ModelReferenceIOMismatchMessage "none"
+ ModelReferenceCSMismatchMessage "none"
+ UnknownTsInhSupMsg "warning"
+ ModelReferenceDataLoggingMessage "warning"
+ ModelReferenceSymbolNameMessage "warning"
+ ModelReferenceExtraNoncontSigs "error"
+ StateNameClashWarn "warning"
+ SimStateInterfaceChecksumMismatchMsg "warning"
+ SimStateOlderReleaseMsg "error"
+ InitInArrayFormatMsg "warning"
+ StrictBusMsg "ErrorLevel1"
+ BusNameAdapt "WarnAndRepair"
+ NonBusSignalsTreatedAsBus "none"
+ LoggingUnavailableSignals "error"
+ BlockIODiagnostic "none"
+ SFUnusedDataAndEventsDiag "warning"
+ SFUnexpectedBacktrackingDiag "warning"
+ SFInvalidInputDataAccessInChartInitDiag "warning"
+ SFNoUnconditionalDefaultTransitionDiag "warning"
+ SFTransitionOutsideNaturalParentDiag "warning"
+ SFUnconditionalTransitionShadowingDiag "warning"
+ }
+ Simulink.HardwareCC {
+ $ObjectID 7
+ Version "1.12.0"
+ ProdBitPerChar 8
+ ProdBitPerShort 16
+ ProdBitPerInt 32
+ ProdBitPerLong 32
+ ProdBitPerFloat 32
+ ProdBitPerDouble 64
+ ProdBitPerPointer 32
+ ProdLargestAtomicInteger "Char"
+ ProdLargestAtomicFloat "None"
+ ProdIntDivRoundTo "Undefined"
+ ProdEndianess "Unspecified"
+ ProdWordSize 32
+ ProdShiftRightIntArith on
+ ProdHWDeviceType "32-bit Generic"
+ TargetBitPerChar 8
+ TargetBitPerShort 16
+ TargetBitPerInt 32
+ TargetBitPerLong 32
+ TargetBitPerFloat 32
+ TargetBitPerDouble 64
+ TargetBitPerPointer 32
+ TargetLargestAtomicInteger "Char"
+ TargetLargestAtomicFloat "None"
+ TargetShiftRightIntArith on
+ TargetIntDivRoundTo "Undefined"
+ TargetEndianess "Unspecified"
+ TargetWordSize 32
+ TargetTypeEmulationWarnSuppressLevel 0
+ TargetPreprocMaxBitsSint 32
+ TargetPreprocMaxBitsUint 32
+ TargetHWDeviceType "Specified"
+ TargetUnknown off
+ ProdEqTarget on
+ }
+ Simulink.ModelReferenceCC {
+ $ObjectID 8
+ Version "1.12.0"
+ UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
+ CheckModelReferenceTargetMessage "error"
+ EnableParallelModelReferenceBuilds off
+ ParallelModelReferenceErrorOnInvalidPool on
+ ParallelModelReferenceMATLABWorkerInit "None"
+ ModelReferenceNumInstancesAllowed "Multi"
+ PropagateVarSize "Infer from blocks in model"
+ ModelReferencePassRootInputsByReference on
+ ModelReferenceMinAlgLoopOccurrences off
+ PropagateSignalLabelsOutOfModel off
+ SupportModelReferenceSimTargetCustomCode off
+ }
+ Simulink.SFSimCC {
+ $ObjectID 9
+ Version "1.12.0"
+ SFSimEnableDebug on
+ SFSimOverflowDetection on
+ SFSimEcho on
+ SimBlas on
+ SimCtrlC on
+ SimExtrinsic on
+ SimIntegrity on
+ SimUseLocalCustomCode off
+ SimParseCustomCode on
+ SimBuildMode "sf_incremental_build"
+ }
+ Simulink.RTWCC {
+ $BackupClass "Simulink.RTWCC"
+ $ObjectID 10
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 9
+ Cell "IncludeHyperlinkInReport"
+ Cell "GenerateTraceInfo"
+ Cell "GenerateTraceReport"
+ Cell "GenerateTraceReportSl"
+ Cell "GenerateTraceReportSf"
+ Cell "GenerateTraceReportEml"
+ Cell "GenerateWebview"
+ Cell "GenerateCodeMetricsReport"
+ Cell "GenerateCodeReplacementReport"
+ PropName "DisabledProps"
+ }
+ SystemTargetFile "grt.tlc"
+ GenCodeOnly off
+ MakeCommand "make_rtw"
+ GenerateMakefile on
+ TemplateMakefile "grt_default_tmf"
+ GenerateReport off
+ SaveLog off
+ RTWVerbose on
+ RetainRTWFile off
+ ProfileTLC off
+ TLCDebug off
+ TLCCoverage off
+ TLCAssert off
+ ProcessScriptMode "Default"
+ ConfigurationMode "Optimized"
+ ConfigAtBuild off
+ RTWUseLocalCustomCode off
+ RTWUseSimCustomCode off
+ IncludeHyperlinkInReport off
+ LaunchReport off
+ TargetLang "C"
+ IncludeBusHierarchyInRTWFileBlockHierarchyMap off
+ IncludeERTFirstTime off
+ GenerateTraceInfo off
+ GenerateTraceReport off
+ GenerateTraceReportSl off
+ GenerateTraceReportSf off
+ GenerateTraceReportEml off
+ GenerateCodeInfo off
+ GenerateWebview off
+ GenerateCodeMetricsReport off
+ GenerateCodeReplacementReport off
+ RTWCompilerOptimization "Off"
+ CheckMdlBeforeBuild "Off"
+ CustomRebuildMode "OnUpdate"
+ Array {
+ Type "Handle"
+ Dimension 2
+ Simulink.CodeAppCC {
+ $ObjectID 11
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 21
+ Cell "IgnoreCustomStorageClasses"
+ Cell "IgnoreTestpoints"
+ Cell "InsertBlockDesc"
+ Cell "InsertPolySpaceComments"
+ Cell "SFDataObjDesc"
+ Cell "MATLABFcnDesc"
+ Cell "SimulinkDataObjDesc"
+ Cell "DefineNamingRule"
+ Cell "SignalNamingRule"
+ Cell "ParamNamingRule"
+ Cell "InlinedPrmAccess"
+ Cell "CustomSymbolStr"
+ Cell "CustomSymbolStrGlobalVar"
+ Cell "CustomSymbolStrType"
+ Cell "CustomSymbolStrField"
+ Cell "CustomSymbolStrFcn"
+ Cell "CustomSymbolStrFcnArg"
+ Cell "CustomSymbolStrBlkIO"
+ Cell "CustomSymbolStrTmpVar"
+ Cell "CustomSymbolStrMacro"
+ Cell "ReqsInCode"
+ PropName "DisabledProps"
+ }
+ ForceParamTrailComments off
+ GenerateComments on
+ IgnoreCustomStorageClasses on
+ IgnoreTestpoints off
+ IncHierarchyInIds off
+ MaxIdLength 31
+ PreserveName off
+ PreserveNameWithParent off
+ ShowEliminatedStatement off
+ IncAutoGenComments off
+ SimulinkDataObjDesc off
+ SFDataObjDesc off
+ MATLABFcnDesc off
+ IncDataTypeInIds off
+ MangleLength 1
+ CustomSymbolStrGlobalVar "$R$N$M"
+ CustomSymbolStrType "$N$R$M"
+ CustomSymbolStrField "$N$M"
+ CustomSymbolStrFcn "$R$N$M$F"
+ CustomSymbolStrFcnArg "rt$I$N$M"
+ CustomSymbolStrBlkIO "rtb_$N$M"
+ CustomSymbolStrTmpVar "$N$M"
+ CustomSymbolStrMacro "$R$N$M"
+ DefineNamingRule "None"
+ ParamNamingRule "None"
+ SignalNamingRule "None"
+ InsertBlockDesc off
+ InsertPolySpaceComments off
+ SimulinkBlockComments on
+ MATLABSourceComments off
+ EnableCustomComments off
+ InlinedPrmAccess "Literals"
+ ReqsInCode off
+ UseSimReservedNames off
+ }
+ Simulink.GRTTargetCC {
+ $BackupClass "Simulink.TargetCC"
+ $ObjectID 12
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 16
+ Cell "GeneratePreprocessorConditionals"
+ Cell "IncludeMdlTerminateFcn"
+ Cell "CombineOutputUpdateFcns"
+ Cell "SuppressErrorStatus"
+ Cell "ERTCustomFileBanners"
+ Cell "GenerateSampleERTMain"
+ Cell "GenerateTestInterfaces"
+ Cell "ModelStepFunctionPrototypeControlCompliant"
+ Cell "CPPClassGenCompliant"
+ Cell "MultiInstanceERTCode"
+ Cell "PurelyIntegerCode"
+ Cell "SupportComplex"
+ Cell "SupportAbsoluteTime"
+ Cell "SupportContinuousTime"
+ Cell "SupportNonInlinedSFcns"
+ Cell "PortableWordSizes"
+ PropName "DisabledProps"
+ }
+ TargetFcnLib "ansi_tfl_table_tmw.mat"
+ TargetLibSuffix ""
+ TargetPreCompLibLocation ""
+ CodeReplacementLibrary "ANSI_C"
+ UtilityFuncGeneration "Auto"
+ ERTMultiwordTypeDef "System defined"
+ CodeExecutionProfiling off
+ ERTMultiwordLength 256
+ MultiwordLength 2048
+ GenerateFullHeader on
+ GenerateSampleERTMain off
+ GenerateTestInterfaces off
+ IsPILTarget off
+ ModelReferenceCompliant on
+ ParMdlRefBuildCompliant on
+ CompOptLevelCompliant on
+ ConcurrentExecutionCompliant on
+ IncludeMdlTerminateFcn on
+ GeneratePreprocessorConditionals "Disable all"
+ CombineOutputUpdateFcns on
+ CombineSignalStateStructs off
+ SuppressErrorStatus off
+ ERTFirstTimeCompliant off
+ IncludeFileDelimiter "Auto"
+ ERTCustomFileBanners off
+ SupportAbsoluteTime on
+ LogVarNameModifier "rt_"
+ MatFileLogging on
+ MultiInstanceERTCode off
+ SupportNonFinite on
+ SupportComplex on
+ PurelyIntegerCode off
+ SupportContinuousTime on
+ SupportNonInlinedSFcns on
+ SupportVariableSizeSignals off
+ EnableShiftOperators on
+ ParenthesesLevel "Nominal"
+ PortableWordSizes off
+ ModelStepFunctionPrototypeControlCompliant off
+ CPPClassGenCompliant off
+ AutosarCompliant off
+ GRTInterface off
+ UseMalloc off
+ ExtMode off
+ ExtModeStaticAlloc off
+ ExtModeTesting off
+ ExtModeStaticAllocSize 1000000
+ ExtModeTransport 0
+ ExtModeMexFile "ext_comm"
+ ExtModeIntrfLevel "Level1"
+ RTWCAPISignals off
+ RTWCAPIParams off
+ RTWCAPIStates off
+ RTWCAPIRootIO off
+ GenerateASAP2 off
+ }
+ PropName "Components"
+ }
+ }
+ PropName "Components"
+ }
+ Name "Configuration"
+ CurrentDlgPage "Solver"
+ ConfigPrmDlgPosition [ 516, 202, 1404, 859 ]
+ }
+ PropName "ConfigurationSets"
+ }
+ Simulink.ConfigSet {
+ $PropName "ActiveConfigurationSet"
+ $ObjectID 2
+ }
+ ExplicitPartitioning off
+ BlockDefaults {
+ ForegroundColor "black"
+ BackgroundColor "white"
+ DropShadow off
+ NamePlacement "normal"
+ FontName "Helvetica"
+ FontSize 10
+ FontWeight "normal"
+ FontAngle "normal"
+ ShowName on
+ BlockRotation 0
+ BlockMirror off
+ }
+ AnnotationDefaults {
+ HorizontalAlignment "center"
+ VerticalAlignment "middle"
+ ForegroundColor "black"
+ BackgroundColor "white"
+ DropShadow off
+ FontName "Helvetica"
+ FontSize 10
+ FontWeight "normal"
+ FontAngle "normal"
+ UseDisplayTextAsClickCallback off
+ }
+ LineDefaults {
+ FontName "Helvetica"
+ FontSize 9
+ FontWeight "normal"
+ FontAngle "normal"
+ }
+ BlockParameterDefaults {
+ Block {
+ BlockType Clock
+ DisplayTime off
+ Decimation "10"
+ }
+ Block {
+ BlockType Constant
+ Value "1"
+ VectorParams1D on
+ SamplingMode "Sample based"
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: Inherit from 'Constant value'"
+ LockScale off
+ SampleTime "inf"
+ FramePeriod "inf"
+ PreserveConstantTs off
+ }
+ Block {
+ BlockType Demux
+ Outputs "4"
+ DisplayOption "none"
+ BusSelectionMode off
+ }
+ Block {
+ BlockType Inport
+ Port "1"
+ OutputFunctionCall off
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: auto"
+ LockScale off
+ BusOutputAsStruct off
+ PortDimensions "-1"
+ VarSizeSig "Inherit"
+ SampleTime "-1"
+ SignalType "auto"
+ SamplingMode "auto"
+ LatchByDelayingOutsideSignal off
+ LatchInputForFeedbackSignals off
+ Interpolate on
+ }
+ Block {
+ BlockType Integrator
+ ExternalReset "none"
+ InitialConditionSource "internal"
+ InitialCondition "0"
+ LimitOutput off
+ UpperSaturationLimit "inf"
+ LowerSaturationLimit "-inf"
+ ShowSaturationPort off
+ ShowStatePort off
+ AbsoluteTolerance "auto"
+ IgnoreLimit off
+ ZeroCross on
+ ContinuousStateAttributes "''"
+ }
+ Block {
+ BlockType Outport
+ Port "1"
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: auto"
+ LockScale off
+ BusOutputAsStruct off
+ PortDimensions "-1"
+ VarSizeSig "Inherit"
+ SampleTime "-1"
+ SignalType "auto"
+ SamplingMode "auto"
+ SourceOfInitialOutputValue "Dialog"
+ OutputWhenDisabled "held"
+ InitialOutput "[]"
+ }
+ Block {
+ BlockType Product
+ Inputs "2"
+ Multiplication "Element-wise(.*)"
+ CollapseMode "All dimensions"
+ CollapseDim "1"
+ InputSameDT on
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: Same as first input"
+ LockScale off
+ RndMeth "Zero"
+ SaturateOnIntegerOverflow on
+ SampleTime "-1"
+ }
+ Block {
+ BlockType S-Function
+ FunctionName "system"
+ SFunctionModules "''"
+ PortCounts "[]"
+ SFunctionDeploymentMode off
+ }
+ Block {
+ BlockType SubSystem
+ ShowPortLabels "FromPortIcon"
+ Permissions "ReadWrite"
+ PermitHierarchicalResolution "All"
+ TreatAsAtomicUnit off
+ CheckFcnCallInpInsideContextMsg off
+ SystemSampleTime "-1"
+ RTWFcnNameOpts "Auto"
+ RTWFileNameOpts "Auto"
+ RTWMemSecFuncInitTerm "Inherit from model"
+ RTWMemSecFuncExecute "Inherit from model"
+ RTWMemSecDataConstants "Inherit from model"
+ RTWMemSecDataInternal "Inherit from model"
+ RTWMemSecDataParameters "Inherit from model"
+ SimViewingDevice off
+ DataTypeOverride "UseLocalSettings"
+ DataTypeOverrideAppliesTo "AllNumericTypes"
+ MinMaxOverflowLogging "UseLocalSettings"
+ SFBlockType "NONE"
+ Variant off
+ GeneratePreprocessorConditionals off
+ }
+ Block {
+ BlockType Terminator
+ }
+ Block {
+ BlockType ToWorkspace
+ VariableName "simulink_output"
+ MaxDataPoints "1000"
+ Decimation "1"
+ SampleTime "0"
+ SaveFormat "Array"
+ FixptAsFi off
+ NumInputs "1"
+ }
+ }
+ System {
+ Name "p5dennis2"
+ Location [1016, 309, 1664, 894]
+ Open on
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ ReportName "simulink-default.rpt"
+ SIDHighWatermark "17"
+ Block {
+ BlockType Clock
+ Name "Clock"
+ SID "14"
+ Position [85, 25, 105, 45]
+ ZOrder -4
+ }
+ Block {
+ BlockType Constant
+ Name "Constant"
+ SID "1"
+ Position [60, 115, 90, 145]
+ ZOrder -4
+ Value "x_start"
+ }
+ Block {
+ BlockType Constant
+ Name "Constant1"
+ SID "2"
+ Position [60, 310, 90, 340]
+ ZOrder -4
+ Value "y_start"
+ }
+ Block {
+ BlockType SubSystem
+ Name "Hauptfunktion f0"
+ SID "7"
+ Ports [3, 1]
+ Position [280, 186, 350, 234]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f0']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "Hauptfunktion f0"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "7::23"
+ Position [20, 101, 40, 119]
+ ZOrder 9
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "x"
+ SID "7::1"
+ Position [20, 136, 40, 154]
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "y"
+ SID "7::24"
+ Position [20, 171, 40, 189]
+ ZOrder 10
+ Port "3"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "7::20"
+ Ports [1, 1]
+ Position [270, 180, 320, 220]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "7::19"
+ Tag "Stateflow S-Function p5dennis2 2"
+ Ports [3, 2]
+ Position [180, 100, 230, 180]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[3 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "f0out"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "7::22"
+ Position [460, 191, 480, 209]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "f0out"
+ SID "7::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "x"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ SrcBlock "y"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 3
+ }
+ Line {
+ Name "f0out"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "f0out"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType Integrator
+ Name "Integrator X"
+ SID "12"
+ Ports [2, 1]
+ Position [165, 107, 195, 138]
+ ZOrder -2
+ InitialConditionSource "external"
+ }
+ Block {
+ BlockType Integrator
+ Name "Integrator Y"
+ SID "13"
+ Ports [2, 1]
+ Position [165, 302, 195, 333]
+ ZOrder -2
+ InitialConditionSource "external"
+ }
+ Block {
+ BlockType ToWorkspace
+ Name "X To Workspace"
+ SID "16"
+ Ports [1]
+ Position [135, 180, 195, 210]
+ ZOrder -7
+ VariableName "x_out"
+ MaxDataPoints "inf"
+ SampleTime "-1"
+ }
+ Block {
+ BlockType ToWorkspace
+ Name "Y To Workspace1"
+ SID "17"
+ Ports [1]
+ Position [135, 235, 195, 265]
+ ZOrder -7
+ VariableName "y_out"
+ MaxDataPoints "inf"
+ SampleTime "-1"
+ }
+ Block {
+ BlockType SubSystem
+ Name "nebenfunktion f1"
+ SID "8"
+ Ports [2, 1]
+ Position [280, 88, 350, 137]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f1']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "nebenfunktion f1"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "8::23"
+ Position [20, 101, 40, 119]
+ ZOrder 9
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "x"
+ SID "8::1"
+ Position [20, 136, 40, 154]
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "8::20"
+ Ports [1, 1]
+ Position [270, 180, 320, 220]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "8::19"
+ Tag "Stateflow S-Function p5dennis2 1"
+ Ports [2, 2]
+ Position [180, 100, 230, 180]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[2 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "f1out"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "8::22"
+ Position [460, 191, 480, 209]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "f1out"
+ SID "8::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "x"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ Name "f1out"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "f1out"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType SubSystem
+ Name "nebenfunktion f2"
+ SID "9"
+ Ports [2, 1]
+ Position [280, 283, 350, 332]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f2']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "nebenfunktion f2"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "9::23"
+ Position [20, 101, 40, 119]
+ ZOrder 9
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "y"
+ SID "9::1"
+ Position [20, 136, 40, 154]
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "9::20"
+ Ports [1, 1]
+ Position [270, 180, 320, 220]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "9::19"
+ Tag "Stateflow S-Function p5dennis2 3"
+ Ports [2, 2]
+ Position [180, 100, 230, 180]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[2 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "f2out"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "9::22"
+ Position [460, 191, 480, 209]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "f2out"
+ SID "9::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "y"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ Name "f2out"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "f2out"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType Product
+ Name "x prepariert"
+ SID "10"
+ Ports [2, 1]
+ Position [415, 127, 445, 158]
+ ZOrder -19
+ InputSameDT off
+ OutDataTypeStr "Inherit: Inherit via internal rule"
+ SaturateOnIntegerOverflow off
+ }
+ Block {
+ BlockType Product
+ Name "y prepariert"
+ SID "11"
+ Ports [2, 1]
+ Position [415, 242, 445, 273]
+ ZOrder -19
+ InputSameDT off
+ OutDataTypeStr "Inherit: Inherit via internal rule"
+ SaturateOnIntegerOverflow off
+ }
+ Line {
+ SrcBlock "Hauptfunktion f0"
+ SrcPort 1
+ Points [20, 0]
+ Branch {
+ Points [0, -60]
+ DstBlock "x prepariert"
+ DstPort 2
+ }
+ Branch {
+ Points [0, 40]
+ DstBlock "y prepariert"
+ DstPort 1
+ }
+ }
+ Line {
+ SrcBlock "nebenfunktion f1"
+ SrcPort 1
+ Points [20, 0; 0, 20]
+ DstBlock "x prepariert"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "nebenfunktion f2"
+ SrcPort 1
+ Points [20, 0; 0, -45]
+ DstBlock "y prepariert"
+ DstPort 2
+ }
+ Line {
+ SrcBlock "Constant"
+ SrcPort 1
+ DstBlock "Integrator X"
+ DstPort 2
+ }
+ Line {
+ SrcBlock "Constant1"
+ SrcPort 1
+ DstBlock "Integrator Y"
+ DstPort 2
+ }
+ Line {
+ SrcBlock "Integrator X"
+ SrcPort 1
+ Points [40, 0]
+ Branch {
+ DstBlock "nebenfunktion f1"
+ DstPort 2
+ }
+ Branch {
+ Points [-15, 0; 0, 45]
+ Branch {
+ Points [0, 40]
+ DstBlock "Hauptfunktion f0"
+ DstPort 2
+ }
+ Branch {
+ Points [-105, 0]
+ DstBlock "X To Workspace"
+ DstPort 1
+ }
+ }
+ }
+ Line {
+ SrcBlock "x prepariert"
+ SrcPort 1
+ Points [0, -75; -300, 0]
+ DstBlock "Integrator X"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "Integrator Y"
+ SrcPort 1
+ Points [35, 0]
+ Branch {
+ DstBlock "nebenfunktion f2"
+ DstPort 2
+ }
+ Branch {
+ Points [-10, 0; 0, -25]
+ Branch {
+ Points [0, -70]
+ DstBlock "Hauptfunktion f0"
+ DstPort 3
+ }
+ Branch {
+ Points [-105, 0]
+ DstBlock "Y To Workspace1"
+ DstPort 1
+ }
+ }
+ }
+ Line {
+ SrcBlock "y prepariert"
+ SrcPort 1
+ Points [10, 0; 0, 115; -315, 0; 0, -65]
+ DstBlock "Integrator Y"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "Clock"
+ SrcPort 1
+ Points [150, 0; 0, 65]
+ Branch {
+ DstBlock "nebenfunktion f1"
+ DstPort 1
+ }
+ Branch {
+ Points [0, 95]
+ Branch {
+ DstBlock "Hauptfunktion f0"
+ DstPort 1
+ }
+ Branch {
+ Points [0, 100]
+ DstBlock "nebenfunktion f2"
+ DstPort 1
+ }
+ }
+ }
+ }
+}
+# Finite State Machines
+#
+# Stateflow Version 7.6 (R2011b) dated Jan 25 2012, 13:50:40
+#
+#
+
+
+Stateflow {
+ machine {
+ id 1
+ name "p5dennis2"
+ created "06-Feb-2013 14:02:25"
+ isLibrary 0
+ firstTarget 27
+ sfVersion 76014001.00040001
+ }
+ chart {
+ id 2
+ name "nebenfunktion f1"
+ windowPosition [390.75 188.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 3 0 0]
+ firstTransition 5
+ firstJunction 4
+ viewObj 2
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 6
+ chartFileNumber 1
+ disableImplicitCasting 1
+ eml {
+ name "f1"
+ }
+ }
+ state {
+ id 3
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 2
+ treeNode [2 0 0 0]
+ superState SUBCHART
+ subviewer 2
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function f1out = f1(t,x)\n%#codegen\nf1out = x - 5*cos(t);"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 4
+ position [23.5747 49.5747 7]
+ chart 2
+ linkNode [2 0 0]
+ subviewer 2
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 5
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 4
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 2
+ linkNode [2 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 2
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 6
+ ssIdNumber 6
+ name "t"
+ linkNode [2 0 7]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 7
+ ssIdNumber 4
+ name "x"
+ linkNode [2 6 8]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 8
+ ssIdNumber 7
+ name "f1out"
+ linkNode [2 7 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 9
+ name "nebenfunktion f1"
+ machine 1
+ chart 2
+ }
+ chart {
+ id 10
+ name "Hauptfunktion f0"
+ windowPosition [375.75 203.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 11 0 0]
+ firstTransition 13
+ firstJunction 12
+ viewObj 10
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 14
+ chartFileNumber 2
+ disableImplicitCasting 1
+ eml {
+ name "f0"
+ }
+ }
+ state {
+ id 11
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 10
+ treeNode [10 0 0 0]
+ superState SUBCHART
+ subviewer 10
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function f0out = f0(t,x,y)\n%#codegen\nf0out = ( -5*sin(t) * (x-5*cos(t)) + 5*cos(t)*(y-5*sin(t))"
+ ") / (((x-5*cos(t))^2) + (y-5*sin(t))^2);"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 12
+ position [23.5747 49.5747 7]
+ chart 10
+ linkNode [10 0 0]
+ subviewer 10
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 13
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 12
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 10
+ linkNode [10 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 10
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 14
+ ssIdNumber 6
+ name "t"
+ linkNode [10 0 15]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 15
+ ssIdNumber 4
+ name "x"
+ linkNode [10 14 16]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 16
+ ssIdNumber 5
+ name "y"
+ linkNode [10 15 17]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 17
+ ssIdNumber 7
+ name "f0out"
+ linkNode [10 16 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 18
+ name "Hauptfunktion f0"
+ machine 1
+ chart 10
+ }
+ chart {
+ id 19
+ name "nebenfunktion f2"
+ windowPosition [405.75 173.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 20 0 0]
+ firstTransition 22
+ firstJunction 21
+ viewObj 19
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 23
+ chartFileNumber 3
+ disableImplicitCasting 1
+ eml {
+ name "f2"
+ }
+ }
+ state {
+ id 20
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 19
+ treeNode [19 0 0 0]
+ superState SUBCHART
+ subviewer 19
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function f2out = f2(t,y)\n%#codegen\nf2out = (y - 5*sin(t));"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 21
+ position [23.5747 49.5747 7]
+ chart 19
+ linkNode [19 0 0]
+ subviewer 19
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 22
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 21
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 19
+ linkNode [19 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 19
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 23
+ ssIdNumber 6
+ name "t"
+ linkNode [19 0 24]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 24
+ ssIdNumber 4
+ name "y"
+ linkNode [19 23 25]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 25
+ ssIdNumber 7
+ name "f2out"
+ linkNode [19 24 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 26
+ name "nebenfunktion f2"
+ machine 1
+ chart 19
+ }
+ target {
+ id 27
+ name "sfun"
+ description "Default Simulink S-Function Target."
+ machine 1
+ linkNode [1 0 0]
+ }
+}
diff --git a/ws2012/CE/uebungen/P5/LoesungFinal/P5Test-1.pdf b/ws2012/CE/uebungen/P5/LoesungFinal/P5Test-1.pdf
new file mode 100644
index 00000000..70301e4a
Binary files /dev/null and b/ws2012/CE/uebungen/P5/LoesungFinal/P5Test-1.pdf differ
diff --git a/ws2012/CE/uebungen/P5/LoesungFinal/P5Test-1_BIG.pdf b/ws2012/CE/uebungen/P5/LoesungFinal/P5Test-1_BIG.pdf
new file mode 100644
index 00000000..098fbb78
Binary files /dev/null and b/ws2012/CE/uebungen/P5/LoesungFinal/P5Test-1_BIG.pdf differ
diff --git a/ws2012/CE/uebungen/P5/LoesungFinal/P5Test-2.pdf b/ws2012/CE/uebungen/P5/LoesungFinal/P5Test-2.pdf
new file mode 100644
index 00000000..64aafbb1
Binary files /dev/null and b/ws2012/CE/uebungen/P5/LoesungFinal/P5Test-2.pdf differ
diff --git a/ws2012/CE/uebungen/P5/P5.mdl b/ws2012/CE/uebungen/P5/P5.mdl
new file mode 100644
index 00000000..4bb18bdd
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/P5.mdl
@@ -0,0 +1,1887 @@
+Model {
+ Name "P5"
+ Version 7.9
+ MdlSubVersion 0
+ GraphicalInterface {
+ NumRootInports 0
+ NumRootOutports 0
+ ParameterArgumentNames ""
+ ComputedModelVersion "1.22"
+ NumModelReferences 0
+ NumTestPointedSignals 0
+ }
+ SavedCharacterEncoding "UTF-8"
+ SaveDefaultBlockParams on
+ ScopeRefreshTime 0.035000
+ OverrideScopeRefreshTime on
+ DisableAllScopes off
+ DataTypeOverride "UseLocalSettings"
+ DataTypeOverrideAppliesTo "AllNumericTypes"
+ MinMaxOverflowLogging "UseLocalSettings"
+ MinMaxOverflowArchiveMode "Overwrite"
+ FPTRunName "Run 1"
+ MaxMDLFileLineLength 120
+ Created "Tue Feb 05 13:38:32 2013"
+ Creator "dk1003"
+ UpdateHistory "UpdateHistoryNever"
+ ModifiedByFormat "%"
+ LastModifiedBy "dk1003"
+ ModifiedDateFormat "%"
+ LastModifiedDate "Tue Feb 05 15:10:57 2013"
+ RTWModifiedTimeStamp 0
+ ModelVersionFormat "1.%"
+ ConfigurationManager "None"
+ SampleTimeColors off
+ SampleTimeAnnotations off
+ LibraryLinkDisplay "disabled"
+ WideLines off
+ ShowLineDimensions off
+ ShowPortDataTypes off
+ ShowDesignRanges off
+ ShowLoopsOnError on
+ IgnoreBidirectionalLines off
+ ShowStorageClass off
+ ShowTestPointIcons on
+ ShowSignalResolutionIcons on
+ ShowViewerIcons on
+ SortedOrder off
+ ExecutionContextIcon off
+ ShowLinearizationAnnotations on
+ BlockNameDataTip off
+ BlockParametersDataTip off
+ BlockDescriptionStringDataTip off
+ ToolBar on
+ StatusBar on
+ BrowserShowLibraryLinks off
+ BrowserLookUnderMasks off
+ SimulationMode "normal"
+ LinearizationMsg "none"
+ Profile off
+ ParamWorkspaceSource "MATLABWorkspace"
+ AccelSystemTargetFile "accel.tlc"
+ AccelTemplateMakefile "accel_default_tmf"
+ AccelMakeCommand "make_rtw"
+ TryForcingSFcnDF off
+ Object {
+ $PropName "DataLoggingOverride"
+ $ObjectID 1
+ $ClassName "Simulink.SimulationData.ModelLoggingInfo"
+ model_ "P5"
+ signals_ []
+ overrideMode_ [0U]
+ Array {
+ Type "Cell"
+ Dimension 1
+ Cell "P5"
+ PropName "logAsSpecifiedByModels_"
+ }
+ Array {
+ Type "Cell"
+ Dimension 1
+ Cell []
+ PropName "logAsSpecifiedByModelsSSIDs_"
+ }
+ }
+ RecordCoverage off
+ CovPath "/"
+ CovSaveName "covdata"
+ CovMetricSettings "dw"
+ CovNameIncrementing off
+ CovHtmlReporting on
+ CovForceBlockReductionOff on
+ covSaveCumulativeToWorkspaceVar on
+ CovSaveSingleToWorkspaceVar on
+ CovCumulativeVarName "covCumulativeData"
+ CovCumulativeReport off
+ CovReportOnPause on
+ CovModelRefEnable "Off"
+ CovExternalEMLEnable off
+ ExtModeBatchMode off
+ ExtModeEnableFloating on
+ ExtModeTrigType "manual"
+ ExtModeTrigMode "normal"
+ ExtModeTrigPort "1"
+ ExtModeTrigElement "any"
+ ExtModeTrigDuration 1000
+ ExtModeTrigDurationFloating "auto"
+ ExtModeTrigHoldOff 0
+ ExtModeTrigDelay 0
+ ExtModeTrigDirection "rising"
+ ExtModeTrigLevel 0
+ ExtModeArchiveMode "off"
+ ExtModeAutoIncOneShot off
+ ExtModeIncDirWhenArm off
+ ExtModeAddSuffixToVar off
+ ExtModeWriteAllDataToWs off
+ ExtModeArmWhenConnect on
+ ExtModeSkipDownloadWhenConnect off
+ ExtModeLogAll on
+ ExtModeAutoUpdateStatusClock on
+ BufferReuse on
+ ShowModelReferenceBlockVersion off
+ ShowModelReferenceBlockIO off
+ Array {
+ Type "Handle"
+ Dimension 1
+ Simulink.ConfigSet {
+ $ObjectID 2
+ Version "1.12.0"
+ Array {
+ Type "Handle"
+ Dimension 8
+ Simulink.SolverCC {
+ $ObjectID 3
+ Version "1.12.0"
+ StartTime "0.0"
+ StopTime "100"
+ AbsTol "auto"
+ FixedStep "1"
+ InitialStep "auto"
+ MaxNumMinSteps "-1"
+ MaxOrder 5
+ ZcThreshold "auto"
+ ConsecutiveZCsStepRelTol "10*128*eps"
+ MaxConsecutiveZCs "1000"
+ ExtrapolationOrder 4
+ NumberNewtonIterations 1
+ MaxStep "auto"
+ MinStep "auto"
+ MaxConsecutiveMinStep "1"
+ RelTol "1e-3"
+ SolverMode "Auto"
+ EnableConcurrentExecution off
+ ConcurrentTasks off
+ Solver "ode3"
+ SolverName "ode3"
+ SolverJacobianMethodControl "auto"
+ ShapePreserveControl "DisableAll"
+ ZeroCrossControl "UseLocalSettings"
+ ZeroCrossAlgorithm "Nonadaptive"
+ AlgebraicLoopSolver "TrustRegion"
+ SolverResetMethod "Fast"
+ PositivePriorityOrder off
+ AutoInsertRateTranBlk off
+ SampleTimeConstraint "Unconstrained"
+ InsertRTBMode "Whenever possible"
+ }
+ Simulink.DataIOCC {
+ $ObjectID 4
+ Version "1.12.0"
+ Decimation "1"
+ ExternalInput "[t, u]"
+ FinalStateName "xFinal"
+ InitialState "xInitial"
+ LimitDataPoints on
+ MaxDataPoints "1000"
+ LoadExternalInput off
+ LoadInitialState off
+ SaveFinalState off
+ SaveCompleteFinalSimState off
+ SaveFormat "Array"
+ SignalLoggingSaveFormat "ModelDataLogs"
+ SaveOutput on
+ SaveState off
+ SignalLogging on
+ DSMLogging on
+ InspectSignalLogs off
+ SaveTime on
+ ReturnWorkspaceOutputs off
+ StateSaveName "xout"
+ TimeSaveName "tout"
+ OutputSaveName "yout"
+ SignalLoggingName "logsout"
+ DSMLoggingName "dsmout"
+ OutputOption "RefineOutputTimes"
+ OutputTimes "[]"
+ ReturnWorkspaceOutputsName "out"
+ Refine "1"
+ }
+ Simulink.OptimizationCC {
+ $ObjectID 5
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 8
+ Cell "BooleansAsBitfields"
+ Cell "PassReuseOutputArgsAs"
+ Cell "PassReuseOutputArgsThreshold"
+ Cell "ZeroExternalMemoryAtStartup"
+ Cell "ZeroInternalMemoryAtStartup"
+ Cell "OptimizeModelRefInitCode"
+ Cell "NoFixptDivByZeroProtection"
+ Cell "UseSpecifiedMinMax"
+ PropName "DisabledProps"
+ }
+ BlockReduction on
+ BooleanDataType on
+ ConditionallyExecuteInputs on
+ InlineParams off
+ UseIntDivNetSlope off
+ UseFloatMulNetSlope off
+ UseSpecifiedMinMax off
+ InlineInvariantSignals off
+ OptimizeBlockIOStorage on
+ BufferReuse on
+ EnhancedBackFolding off
+ StrengthReduction off
+ ExpressionFolding on
+ BooleansAsBitfields off
+ BitfieldContainerType "uint_T"
+ EnableMemcpy on
+ MemcpyThreshold 64
+ PassReuseOutputArgsAs "Structure reference"
+ ExpressionDepthLimit 2147483647
+ FoldNonRolledExpr on
+ LocalBlockOutputs on
+ RollThreshold 5
+ SystemCodeInlineAuto off
+ StateBitsets off
+ DataBitsets off
+ UseTempVars off
+ ZeroExternalMemoryAtStartup on
+ ZeroInternalMemoryAtStartup on
+ InitFltsAndDblsToZero off
+ NoFixptDivByZeroProtection off
+ EfficientFloat2IntCast off
+ EfficientMapNaN2IntZero on
+ OptimizeModelRefInitCode off
+ LifeSpan "inf"
+ MaxStackSize "Inherit from target"
+ BufferReusableBoundary on
+ SimCompilerOptimization "Off"
+ AccelVerboseBuild off
+ ParallelExecutionInRapidAccelerator on
+ }
+ Simulink.DebuggingCC {
+ $ObjectID 6
+ Version "1.12.0"
+ RTPrefix "error"
+ ConsistencyChecking "none"
+ ArrayBoundsChecking "none"
+ SignalInfNanChecking "none"
+ SignalRangeChecking "none"
+ ReadBeforeWriteMsg "UseLocalSettings"
+ WriteAfterWriteMsg "UseLocalSettings"
+ WriteAfterReadMsg "UseLocalSettings"
+ AlgebraicLoopMsg "warning"
+ ArtificialAlgebraicLoopMsg "warning"
+ SaveWithDisabledLinksMsg "warning"
+ SaveWithParameterizedLinksMsg "warning"
+ CheckSSInitialOutputMsg on
+ UnderspecifiedInitializationDetection "Classic"
+ MergeDetectMultiDrivingBlocksExec "none"
+ CheckExecutionContextPreStartOutputMsg off
+ CheckExecutionContextRuntimeOutputMsg off
+ SignalResolutionControl "UseLocalSettings"
+ BlockPriorityViolationMsg "warning"
+ MinStepSizeMsg "warning"
+ TimeAdjustmentMsg "none"
+ MaxConsecutiveZCsMsg "error"
+ MaskedZcDiagnostic "warning"
+ IgnoredZcDiagnostic "warning"
+ SolverPrmCheckMsg "warning"
+ InheritedTsInSrcMsg "warning"
+ DiscreteInheritContinuousMsg "warning"
+ MultiTaskDSMMsg "error"
+ MultiTaskCondExecSysMsg "error"
+ MultiTaskRateTransMsg "error"
+ SingleTaskRateTransMsg "none"
+ TasksWithSamePriorityMsg "warning"
+ SigSpecEnsureSampleTimeMsg "warning"
+ CheckMatrixSingularityMsg "none"
+ IntegerOverflowMsg "warning"
+ Int32ToFloatConvMsg "warning"
+ ParameterDowncastMsg "error"
+ ParameterOverflowMsg "error"
+ ParameterUnderflowMsg "none"
+ ParameterPrecisionLossMsg "warning"
+ ParameterTunabilityLossMsg "warning"
+ FixptConstUnderflowMsg "none"
+ FixptConstOverflowMsg "none"
+ FixptConstPrecisionLossMsg "none"
+ UnderSpecifiedDataTypeMsg "none"
+ UnnecessaryDatatypeConvMsg "none"
+ VectorMatrixConversionMsg "none"
+ InvalidFcnCallConnMsg "error"
+ FcnCallInpInsideContextMsg "Enable All"
+ SignalLabelMismatchMsg "none"
+ UnconnectedInputMsg "warning"
+ UnconnectedOutputMsg "warning"
+ UnconnectedLineMsg "warning"
+ SFcnCompatibilityMsg "none"
+ FrameProcessingCompatibilityMsg "warning"
+ UniqueDataStoreMsg "none"
+ BusObjectLabelMismatch "warning"
+ RootOutportRequireBusObject "warning"
+ AssertControl "UseLocalSettings"
+ EnableOverflowDetection off
+ ModelReferenceIOMsg "none"
+ ModelReferenceMultiInstanceNormalModeStructChecksumCheck "error"
+ ModelReferenceVersionMismatchMessage "none"
+ ModelReferenceIOMismatchMessage "none"
+ ModelReferenceCSMismatchMessage "none"
+ UnknownTsInhSupMsg "warning"
+ ModelReferenceDataLoggingMessage "warning"
+ ModelReferenceSymbolNameMessage "warning"
+ ModelReferenceExtraNoncontSigs "error"
+ StateNameClashWarn "warning"
+ SimStateInterfaceChecksumMismatchMsg "warning"
+ SimStateOlderReleaseMsg "error"
+ InitInArrayFormatMsg "warning"
+ StrictBusMsg "ErrorLevel1"
+ BusNameAdapt "WarnAndRepair"
+ NonBusSignalsTreatedAsBus "none"
+ LoggingUnavailableSignals "error"
+ BlockIODiagnostic "none"
+ SFUnusedDataAndEventsDiag "warning"
+ SFUnexpectedBacktrackingDiag "warning"
+ SFInvalidInputDataAccessInChartInitDiag "warning"
+ SFNoUnconditionalDefaultTransitionDiag "warning"
+ SFTransitionOutsideNaturalParentDiag "warning"
+ SFUnconditionalTransitionShadowingDiag "warning"
+ }
+ Simulink.HardwareCC {
+ $ObjectID 7
+ Version "1.12.0"
+ ProdBitPerChar 8
+ ProdBitPerShort 16
+ ProdBitPerInt 32
+ ProdBitPerLong 32
+ ProdBitPerFloat 32
+ ProdBitPerDouble 64
+ ProdBitPerPointer 32
+ ProdLargestAtomicInteger "Char"
+ ProdLargestAtomicFloat "None"
+ ProdIntDivRoundTo "Undefined"
+ ProdEndianess "Unspecified"
+ ProdWordSize 32
+ ProdShiftRightIntArith on
+ ProdHWDeviceType "32-bit Generic"
+ TargetBitPerChar 8
+ TargetBitPerShort 16
+ TargetBitPerInt 32
+ TargetBitPerLong 32
+ TargetBitPerFloat 32
+ TargetBitPerDouble 64
+ TargetBitPerPointer 32
+ TargetLargestAtomicInteger "Char"
+ TargetLargestAtomicFloat "None"
+ TargetShiftRightIntArith on
+ TargetIntDivRoundTo "Undefined"
+ TargetEndianess "Unspecified"
+ TargetWordSize 32
+ TargetTypeEmulationWarnSuppressLevel 0
+ TargetPreprocMaxBitsSint 32
+ TargetPreprocMaxBitsUint 32
+ TargetHWDeviceType "Specified"
+ TargetUnknown off
+ ProdEqTarget on
+ }
+ Simulink.ModelReferenceCC {
+ $ObjectID 8
+ Version "1.12.0"
+ UpdateModelReferenceTargets "IfOutOfDateOrStructuralChange"
+ CheckModelReferenceTargetMessage "error"
+ EnableParallelModelReferenceBuilds off
+ ParallelModelReferenceErrorOnInvalidPool on
+ ParallelModelReferenceMATLABWorkerInit "None"
+ ModelReferenceNumInstancesAllowed "Multi"
+ PropagateVarSize "Infer from blocks in model"
+ ModelReferencePassRootInputsByReference on
+ ModelReferenceMinAlgLoopOccurrences off
+ PropagateSignalLabelsOutOfModel off
+ SupportModelReferenceSimTargetCustomCode off
+ }
+ Simulink.SFSimCC {
+ $ObjectID 9
+ Version "1.12.0"
+ SFSimEnableDebug on
+ SFSimOverflowDetection on
+ SFSimEcho on
+ SimBlas on
+ SimCtrlC on
+ SimExtrinsic on
+ SimIntegrity on
+ SimUseLocalCustomCode off
+ SimParseCustomCode on
+ SimBuildMode "sf_incremental_build"
+ }
+ Simulink.RTWCC {
+ $BackupClass "Simulink.RTWCC"
+ $ObjectID 10
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 9
+ Cell "IncludeHyperlinkInReport"
+ Cell "GenerateTraceInfo"
+ Cell "GenerateTraceReport"
+ Cell "GenerateTraceReportSl"
+ Cell "GenerateTraceReportSf"
+ Cell "GenerateTraceReportEml"
+ Cell "GenerateWebview"
+ Cell "GenerateCodeMetricsReport"
+ Cell "GenerateCodeReplacementReport"
+ PropName "DisabledProps"
+ }
+ SystemTargetFile "grt.tlc"
+ GenCodeOnly off
+ MakeCommand "make_rtw"
+ GenerateMakefile on
+ TemplateMakefile "grt_default_tmf"
+ GenerateReport off
+ SaveLog off
+ RTWVerbose on
+ RetainRTWFile off
+ ProfileTLC off
+ TLCDebug off
+ TLCCoverage off
+ TLCAssert off
+ ProcessScriptMode "Default"
+ ConfigurationMode "Optimized"
+ ConfigAtBuild off
+ RTWUseLocalCustomCode off
+ RTWUseSimCustomCode off
+ IncludeHyperlinkInReport off
+ LaunchReport off
+ TargetLang "C"
+ IncludeBusHierarchyInRTWFileBlockHierarchyMap off
+ IncludeERTFirstTime off
+ GenerateTraceInfo off
+ GenerateTraceReport off
+ GenerateTraceReportSl off
+ GenerateTraceReportSf off
+ GenerateTraceReportEml off
+ GenerateCodeInfo off
+ GenerateWebview off
+ GenerateCodeMetricsReport off
+ GenerateCodeReplacementReport off
+ RTWCompilerOptimization "Off"
+ CheckMdlBeforeBuild "Off"
+ CustomRebuildMode "OnUpdate"
+ Array {
+ Type "Handle"
+ Dimension 2
+ Simulink.CodeAppCC {
+ $ObjectID 11
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 21
+ Cell "IgnoreCustomStorageClasses"
+ Cell "IgnoreTestpoints"
+ Cell "InsertBlockDesc"
+ Cell "InsertPolySpaceComments"
+ Cell "SFDataObjDesc"
+ Cell "MATLABFcnDesc"
+ Cell "SimulinkDataObjDesc"
+ Cell "DefineNamingRule"
+ Cell "SignalNamingRule"
+ Cell "ParamNamingRule"
+ Cell "InlinedPrmAccess"
+ Cell "CustomSymbolStr"
+ Cell "CustomSymbolStrGlobalVar"
+ Cell "CustomSymbolStrType"
+ Cell "CustomSymbolStrField"
+ Cell "CustomSymbolStrFcn"
+ Cell "CustomSymbolStrFcnArg"
+ Cell "CustomSymbolStrBlkIO"
+ Cell "CustomSymbolStrTmpVar"
+ Cell "CustomSymbolStrMacro"
+ Cell "ReqsInCode"
+ PropName "DisabledProps"
+ }
+ ForceParamTrailComments off
+ GenerateComments on
+ IgnoreCustomStorageClasses on
+ IgnoreTestpoints off
+ IncHierarchyInIds off
+ MaxIdLength 31
+ PreserveName off
+ PreserveNameWithParent off
+ ShowEliminatedStatement off
+ IncAutoGenComments off
+ SimulinkDataObjDesc off
+ SFDataObjDesc off
+ MATLABFcnDesc off
+ IncDataTypeInIds off
+ MangleLength 1
+ CustomSymbolStrGlobalVar "$R$N$M"
+ CustomSymbolStrType "$N$R$M"
+ CustomSymbolStrField "$N$M"
+ CustomSymbolStrFcn "$R$N$M$F"
+ CustomSymbolStrFcnArg "rt$I$N$M"
+ CustomSymbolStrBlkIO "rtb_$N$M"
+ CustomSymbolStrTmpVar "$N$M"
+ CustomSymbolStrMacro "$R$N$M"
+ DefineNamingRule "None"
+ ParamNamingRule "None"
+ SignalNamingRule "None"
+ InsertBlockDesc off
+ InsertPolySpaceComments off
+ SimulinkBlockComments on
+ MATLABSourceComments off
+ EnableCustomComments off
+ InlinedPrmAccess "Literals"
+ ReqsInCode off
+ UseSimReservedNames off
+ }
+ Simulink.GRTTargetCC {
+ $BackupClass "Simulink.TargetCC"
+ $ObjectID 12
+ Version "1.12.0"
+ Array {
+ Type "Cell"
+ Dimension 16
+ Cell "GeneratePreprocessorConditionals"
+ Cell "IncludeMdlTerminateFcn"
+ Cell "CombineOutputUpdateFcns"
+ Cell "SuppressErrorStatus"
+ Cell "ERTCustomFileBanners"
+ Cell "GenerateSampleERTMain"
+ Cell "GenerateTestInterfaces"
+ Cell "ModelStepFunctionPrototypeControlCompliant"
+ Cell "CPPClassGenCompliant"
+ Cell "MultiInstanceERTCode"
+ Cell "PurelyIntegerCode"
+ Cell "SupportComplex"
+ Cell "SupportAbsoluteTime"
+ Cell "SupportContinuousTime"
+ Cell "SupportNonInlinedSFcns"
+ Cell "PortableWordSizes"
+ PropName "DisabledProps"
+ }
+ TargetFcnLib "ansi_tfl_table_tmw.mat"
+ TargetLibSuffix ""
+ TargetPreCompLibLocation ""
+ CodeReplacementLibrary "ANSI_C"
+ UtilityFuncGeneration "Auto"
+ ERTMultiwordTypeDef "System defined"
+ CodeExecutionProfiling off
+ ERTMultiwordLength 256
+ MultiwordLength 2048
+ GenerateFullHeader on
+ GenerateSampleERTMain off
+ GenerateTestInterfaces off
+ IsPILTarget off
+ ModelReferenceCompliant on
+ ParMdlRefBuildCompliant on
+ CompOptLevelCompliant on
+ ConcurrentExecutionCompliant on
+ IncludeMdlTerminateFcn on
+ GeneratePreprocessorConditionals "Disable all"
+ CombineOutputUpdateFcns on
+ CombineSignalStateStructs off
+ SuppressErrorStatus off
+ ERTFirstTimeCompliant off
+ IncludeFileDelimiter "Auto"
+ ERTCustomFileBanners off
+ SupportAbsoluteTime on
+ LogVarNameModifier "rt_"
+ MatFileLogging on
+ MultiInstanceERTCode off
+ SupportNonFinite on
+ SupportComplex on
+ PurelyIntegerCode off
+ SupportContinuousTime on
+ SupportNonInlinedSFcns on
+ SupportVariableSizeSignals off
+ EnableShiftOperators on
+ ParenthesesLevel "Nominal"
+ PortableWordSizes off
+ ModelStepFunctionPrototypeControlCompliant off
+ CPPClassGenCompliant off
+ AutosarCompliant off
+ GRTInterface off
+ UseMalloc off
+ ExtMode off
+ ExtModeStaticAlloc off
+ ExtModeTesting off
+ ExtModeStaticAllocSize 1000000
+ ExtModeTransport 0
+ ExtModeMexFile "ext_comm"
+ ExtModeIntrfLevel "Level1"
+ RTWCAPISignals off
+ RTWCAPIParams off
+ RTWCAPIStates off
+ RTWCAPIRootIO off
+ GenerateASAP2 off
+ }
+ PropName "Components"
+ }
+ }
+ PropName "Components"
+ }
+ Name "Configuration"
+ CurrentDlgPage "Solver"
+ ConfigPrmDlgPosition [ 28, 308, 991, 1055 ]
+ }
+ PropName "ConfigurationSets"
+ }
+ Simulink.ConfigSet {
+ $PropName "ActiveConfigurationSet"
+ $ObjectID 2
+ }
+ ExplicitPartitioning off
+ BlockDefaults {
+ ForegroundColor "black"
+ BackgroundColor "white"
+ DropShadow off
+ NamePlacement "normal"
+ FontName "Helvetica"
+ FontSize 10
+ FontWeight "normal"
+ FontAngle "normal"
+ ShowName on
+ BlockRotation 0
+ BlockMirror off
+ }
+ AnnotationDefaults {
+ HorizontalAlignment "center"
+ VerticalAlignment "middle"
+ ForegroundColor "black"
+ BackgroundColor "white"
+ DropShadow off
+ FontName "Helvetica"
+ FontSize 10
+ FontWeight "normal"
+ FontAngle "normal"
+ UseDisplayTextAsClickCallback off
+ }
+ LineDefaults {
+ FontName "Helvetica"
+ FontSize 9
+ FontWeight "normal"
+ FontAngle "normal"
+ }
+ BlockParameterDefaults {
+ Block {
+ BlockType Clock
+ DisplayTime off
+ Decimation "10"
+ }
+ Block {
+ BlockType Constant
+ Value "1"
+ VectorParams1D on
+ SamplingMode "Sample based"
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: Inherit from 'Constant value'"
+ LockScale off
+ SampleTime "inf"
+ FramePeriod "inf"
+ PreserveConstantTs off
+ }
+ Block {
+ BlockType Demux
+ Outputs "4"
+ DisplayOption "none"
+ BusSelectionMode off
+ }
+ Block {
+ BlockType Inport
+ Port "1"
+ OutputFunctionCall off
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: auto"
+ LockScale off
+ BusOutputAsStruct off
+ PortDimensions "-1"
+ VarSizeSig "Inherit"
+ SampleTime "-1"
+ SignalType "auto"
+ SamplingMode "auto"
+ LatchByDelayingOutsideSignal off
+ LatchInputForFeedbackSignals off
+ Interpolate on
+ }
+ Block {
+ BlockType Integrator
+ ExternalReset "none"
+ InitialConditionSource "internal"
+ InitialCondition "0"
+ LimitOutput off
+ UpperSaturationLimit "inf"
+ LowerSaturationLimit "-inf"
+ ShowSaturationPort off
+ ShowStatePort off
+ AbsoluteTolerance "auto"
+ IgnoreLimit off
+ ZeroCross on
+ ContinuousStateAttributes "''"
+ }
+ Block {
+ BlockType Outport
+ Port "1"
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: auto"
+ LockScale off
+ BusOutputAsStruct off
+ PortDimensions "-1"
+ VarSizeSig "Inherit"
+ SampleTime "-1"
+ SignalType "auto"
+ SamplingMode "auto"
+ SourceOfInitialOutputValue "Dialog"
+ OutputWhenDisabled "held"
+ InitialOutput "[]"
+ }
+ Block {
+ BlockType Product
+ Inputs "2"
+ Multiplication "Element-wise(.*)"
+ CollapseMode "All dimensions"
+ CollapseDim "1"
+ InputSameDT on
+ OutMin "[]"
+ OutMax "[]"
+ OutDataTypeStr "Inherit: Same as first input"
+ LockScale off
+ RndMeth "Zero"
+ SaturateOnIntegerOverflow on
+ SampleTime "-1"
+ }
+ Block {
+ BlockType S-Function
+ FunctionName "system"
+ SFunctionModules "''"
+ PortCounts "[]"
+ SFunctionDeploymentMode off
+ }
+ Block {
+ BlockType SubSystem
+ ShowPortLabels "FromPortIcon"
+ Permissions "ReadWrite"
+ PermitHierarchicalResolution "All"
+ TreatAsAtomicUnit off
+ CheckFcnCallInpInsideContextMsg off
+ SystemSampleTime "-1"
+ RTWFcnNameOpts "Auto"
+ RTWFileNameOpts "Auto"
+ RTWMemSecFuncInitTerm "Inherit from model"
+ RTWMemSecFuncExecute "Inherit from model"
+ RTWMemSecDataConstants "Inherit from model"
+ RTWMemSecDataInternal "Inherit from model"
+ RTWMemSecDataParameters "Inherit from model"
+ SimViewingDevice off
+ DataTypeOverride "UseLocalSettings"
+ DataTypeOverrideAppliesTo "AllNumericTypes"
+ MinMaxOverflowLogging "UseLocalSettings"
+ SFBlockType "NONE"
+ Variant off
+ GeneratePreprocessorConditionals off
+ }
+ Block {
+ BlockType Terminator
+ }
+ Block {
+ BlockType ToWorkspace
+ VariableName "simulink_output"
+ MaxDataPoints "1000"
+ Decimation "1"
+ SampleTime "0"
+ SaveFormat "Array"
+ FixptAsFi off
+ NumInputs "1"
+ }
+ }
+ System {
+ Name "P5"
+ Location [164, 205, 1176, 618]
+ Open on
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ ReportName "simulink-default.rpt"
+ SIDHighWatermark "28"
+ Block {
+ BlockType Clock
+ Name "Clock1"
+ SID "23"
+ Position [75, 150, 95, 170]
+ ZOrder -4
+ }
+ Block {
+ BlockType Constant
+ Name "Constant"
+ SID "21"
+ Position [70, 65, 100, 95]
+ ZOrder -4
+ Value "10"
+ }
+ Block {
+ BlockType Constant
+ Name "Constant1"
+ SID "22"
+ Position [70, 260, 100, 290]
+ ZOrder -4
+ Value "0"
+ }
+ Block {
+ BlockType Integrator
+ Name "Integrator"
+ SID "11"
+ Ports [1, 1]
+ Position [425, 120, 455, 150]
+ ZOrder -10
+ }
+ Block {
+ BlockType Integrator
+ Name "Integrator1"
+ SID "12"
+ Ports [1, 1]
+ Position [425, 210, 455, 240]
+ ZOrder -10
+ }
+ Block {
+ BlockType SubSystem
+ Name "MATLAB Function"
+ SID "8"
+ Ports [2, 1]
+ Position [225, 238, 295, 287]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f2']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "MATLAB Function"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "8::23"
+ Position [20, 101, 40, 119]
+ ZOrder 9
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "y"
+ SID "8::24"
+ Position [20, 136, 40, 154]
+ ZOrder 10
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "8::20"
+ Ports [1, 1]
+ Position [270, 160, 320, 200]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "8::19"
+ Tag "Stateflow S-Function P5 2"
+ Ports [2, 2]
+ Position [180, 100, 230, 160]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[2 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "yout"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "8::22"
+ Position [460, 171, 480, 189]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "yout"
+ SID "8::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "y"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ Name "yout"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "yout"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType SubSystem
+ Name "MATLAB Function1"
+ SID "9"
+ Ports [2, 1]
+ Position [225, 54, 295, 101]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f1']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "MATLAB Function1"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "23"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "9::1"
+ Position [20, 101, 40, 119]
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "x"
+ SID "9::23"
+ Position [20, 136, 40, 154]
+ ZOrder 9
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "9::20"
+ Ports [1, 1]
+ Position [270, 160, 320, 200]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "9::19"
+ Tag "Stateflow S-Function P5 1"
+ Ports [2, 2]
+ Position [180, 100, 230, 160]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[2 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "yout"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "9::22"
+ Position [460, 171, 480, 189]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "yout"
+ SID "9::5"
+ Position [460, 101, 480, 119]
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "x"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ Name "yout"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "yout"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType SubSystem
+ Name "MATLAB Function2"
+ SID "10"
+ Ports [3, 1]
+ Position [225, 151, 295, 199]
+ ZOrder -4
+ LibraryVersion "1.32"
+ ErrorFcn "Stateflow.Translate.translate"
+ PermitHierarchicalResolution "ExplicitOnly"
+ TreatAsAtomicUnit on
+ MinAlgLoopOccurrences off
+ PropExecContextOutsideSubsystem off
+ RTWSystemCode "Auto"
+ FunctionWithSeparateData off
+ Opaque off
+ RequestExecContextInheritance off
+ MaskHideContents off
+ SFBlockType "MATLAB Function"
+ MaskType "Stateflow"
+ MaskDescription "Embedded MATLAB block"
+ MaskSelfModifiable on
+ MaskDisplay "bgColor = Simulink.Root.ColorString2Rgb(get_param(gcbh, 'BackgroundColor')); image(imread('pr"
+ "ivate/eml_membrane_16.png','png','BackgroundColor',bgColor(1:3)),'center'); disp([10 10 'f0']);"
+ MaskIconFrame on
+ MaskIconOpaque off
+ MaskIconRotate "none"
+ MaskPortRotate "default"
+ MaskIconUnits "normalized"
+ System {
+ Name "MATLAB Function2"
+ Location [257, 457, 812, 717]
+ Open off
+ ModelBrowserVisibility off
+ ModelBrowserWidth 200
+ ScreenColor "white"
+ PaperOrientation "landscape"
+ PaperPositionMode "auto"
+ PaperType "A4"
+ PaperUnits "centimeters"
+ TiledPaperMargins [1.270000, 1.270000, 1.270000, 1.270000]
+ TiledPageScale 1
+ ShowPageBoundaries off
+ ZoomFactor "100"
+ SIDHighWatermark "25"
+ Block {
+ BlockType Inport
+ Name "t"
+ SID "10::1"
+ Position [20, 101, 40, 119]
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "x"
+ SID "10::23"
+ Position [20, 136, 40, 154]
+ ZOrder 9
+ Port "2"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Inport
+ Name "y"
+ SID "10::24"
+ Position [20, 171, 40, 189]
+ ZOrder 10
+ Port "3"
+ IconDisplay "Port number"
+ }
+ Block {
+ BlockType Demux
+ Name " Demux "
+ SID "10::20"
+ Ports [1, 1]
+ Position [270, 180, 320, 220]
+ ZOrder 6
+ Outputs "1"
+ }
+ Block {
+ BlockType S-Function
+ Name " SFunction "
+ SID "10::19"
+ Tag "Stateflow S-Function P5 3"
+ Ports [3, 2]
+ Position [180, 100, 230, 180]
+ ZOrder 5
+ FunctionName "sf_sfun"
+ PortCounts "[3 2]"
+ EnableBusSupport on
+ Port {
+ PortNumber 2
+ Name "yout"
+ RTWStorageClass "Auto"
+ DataLoggingNameMode "SignalName"
+ }
+ }
+ Block {
+ BlockType Terminator
+ Name " Terminator "
+ SID "10::22"
+ Position [460, 191, 480, 209]
+ ZOrder 8
+ }
+ Block {
+ BlockType Outport
+ Name "yout"
+ SID "10::25"
+ Position [460, 101, 480, 119]
+ ZOrder 11
+ IconDisplay "Port number"
+ }
+ Line {
+ SrcBlock "t"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 1
+ }
+ Line {
+ SrcBlock "x"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 2
+ }
+ Line {
+ SrcBlock "y"
+ SrcPort 1
+ DstBlock " SFunction "
+ DstPort 3
+ }
+ Line {
+ Name "yout"
+ Labels [0, 0]
+ SrcBlock " SFunction "
+ SrcPort 2
+ DstBlock "yout"
+ DstPort 1
+ }
+ Line {
+ SrcBlock " Demux "
+ SrcPort 1
+ DstBlock " Terminator "
+ DstPort 1
+ }
+ Line {
+ SrcBlock " SFunction "
+ SrcPort 1
+ DstBlock " Demux "
+ DstPort 1
+ }
+ }
+ }
+ Block {
+ BlockType Product
+ Name "Product"
+ SID "13"
+ Ports [2, 1]
+ Position [355, 117, 385, 148]
+ ZOrder -13
+ InputSameDT off
+ OutDataTypeStr "Inherit: Inherit via internal rule"
+ SaturateOnIntegerOverflow off
+ }
+ Block {
+ BlockType Product
+ Name "Product1"
+ SID "14"
+ Ports [2, 1]
+ Position [355, 207, 385, 238]
+ ZOrder -13
+ InputSameDT off
+ OutDataTypeStr "Inherit: Inherit via internal rule"
+ SaturateOnIntegerOverflow off
+ }
+ Block {
+ BlockType ToWorkspace
+ Name "To Workspace"
+ SID "25"
+ Ports [1]
+ Position [500, 120, 560, 150]
+ ZOrder -7
+ VariableName "x_out"
+ MaxDataPoints "inf"
+ SampleTime "-1"
+ }
+ Block {
+ BlockType ToWorkspace
+ Name "To Workspace1"
+ SID "26"
+ Ports [1]
+ Position [500, 210, 560, 240]
+ ZOrder -7
+ VariableName "y_out"
+ MaxDataPoints "inf"
+ SampleTime "-1"
+ }
+ Line {
+ SrcBlock "MATLAB Function2"
+ SrcPort 1
+ Points [35, 0]
+ Branch {
+ Points [0, -35]
+ DstBlock "Product"
+ DstPort 2
+ }
+ Branch {
+ Points [0, 40]
+ DstBlock "Product1"
+ DstPort 1
+ }
+ }
+ Line {
+ SrcBlock "MATLAB Function1"
+ SrcPort 1
+ Points [15, 0; 0, 45]
+ DstBlock "Product"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "MATLAB Function"
+ SrcPort 1
+ Points [15, 0; 0, -35]
+ DstBlock "Product1"
+ DstPort 2
+ }
+ Line {
+ SrcBlock "Product"
+ SrcPort 1
+ DstBlock "Integrator"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "Product1"
+ SrcPort 1
+ DstBlock "Integrator1"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "Integrator1"
+ SrcPort 1
+ DstBlock "To Workspace1"
+ DstPort 1
+ }
+ Line {
+ SrcBlock "Integrator"
+ SrcPort 1
+ DstBlock "To Workspace"
+ DstPort 1
+ }
+ Line {
+ Labels [0, 0]
+ SrcBlock "Constant1"
+ SrcPort 1
+ Points [70, 0]
+ Branch {
+ DstBlock "MATLAB Function"
+ DstPort 2
+ }
+ Branch {
+ Points [0, -85]
+ DstBlock "MATLAB Function2"
+ DstPort 3
+ }
+ }
+ Line {
+ SrcBlock "Constant"
+ SrcPort 1
+ Points [70, 0]
+ Branch {
+ Points [30, 0; 0, 10]
+ DstBlock "MATLAB Function1"
+ DstPort 2
+ }
+ Branch {
+ Points [0, 95]
+ DstBlock "MATLAB Function2"
+ DstPort 2
+ }
+ }
+ Line {
+ SrcBlock "Clock1"
+ SrcPort 1
+ Points [20, 0]
+ Branch {
+ DstBlock "MATLAB Function2"
+ DstPort 1
+ }
+ Branch {
+ Points [0, -95]
+ DstBlock "MATLAB Function1"
+ DstPort 1
+ }
+ Branch {
+ Points [0, 90]
+ DstBlock "MATLAB Function"
+ DstPort 1
+ }
+ }
+ }
+}
+# Finite State Machines
+#
+# Stateflow Version 7.6 (R2011b) dated Jan 25 2012, 13:50:40
+#
+#
+
+
+Stateflow {
+ machine {
+ id 1
+ name "P5"
+ created "05-Feb-2013 13:50:01"
+ isLibrary 0
+ firstTarget 27
+ sfVersion 76014001.00040001
+ }
+ chart {
+ id 2
+ name "MATLAB Function1"
+ windowPosition [375.75 203.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 3 0 0]
+ firstTransition 5
+ firstJunction 4
+ viewObj 2
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ subviewS {
+ }
+ ssIdHighWaterMark 6
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 6
+ chartFileNumber 1
+ disableImplicitCasting 1
+ eml {
+ name "f1"
+ }
+ }
+ state {
+ id 3
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 2
+ treeNode [2 0 0 0]
+ superState SUBCHART
+ subviewer 2
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function yout = f1(t,x)\n%#codegen\nyout = x - 5 * cos(t);"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 4
+ position [23.5747 49.5747 7]
+ chart 2
+ linkNode [2 0 0]
+ subviewer 2
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 5
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 4
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 2
+ linkNode [2 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 2
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 6
+ ssIdNumber 4
+ name "t"
+ linkNode [2 0 7]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 7
+ ssIdNumber 5
+ name "yout"
+ linkNode [2 6 8]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 8
+ ssIdNumber 6
+ name "x"
+ linkNode [2 7 0]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 9
+ name "MATLAB Function1"
+ machine 1
+ chart 2
+ }
+ chart {
+ id 10
+ name "MATLAB Function"
+ windowPosition [390.75 188.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 11 0 0]
+ firstTransition 13
+ firstJunction 12
+ viewObj 10
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ subviewS {
+ }
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 14
+ chartFileNumber 2
+ disableImplicitCasting 1
+ eml {
+ name "f2"
+ }
+ }
+ state {
+ id 11
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 10
+ treeNode [10 0 0 0]
+ superState SUBCHART
+ subviewer 10
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function yout = f2(t,y)\n%#codegen\nyout = y - 5 * sin(t);"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 12
+ position [23.5747 49.5747 7]
+ chart 10
+ linkNode [10 0 0]
+ subviewer 10
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 13
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 12
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 10
+ linkNode [10 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 10
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 14
+ ssIdNumber 6
+ name "t"
+ linkNode [10 0 15]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 15
+ ssIdNumber 5
+ name "y"
+ linkNode [10 14 16]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 16
+ ssIdNumber 7
+ name "yout"
+ linkNode [10 15 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 17
+ name "MATLAB Function"
+ machine 1
+ chart 10
+ }
+ chart {
+ id 18
+ name "MATLAB Function2"
+ windowPosition [375.75 203.25 200.25 189.75]
+ viewLimits [0 156.75 0 153.75]
+ screen [1 1 1920 1080 1.25]
+ treeNode [0 19 0 0]
+ firstTransition 21
+ firstJunction 20
+ viewObj 18
+ machine 1
+ toolbarMode LIBRARY_TOOLBAR
+ subviewS {
+ }
+ ssIdHighWaterMark 7
+ decomposition CLUSTER_CHART
+ type EML_CHART
+ firstData 22
+ chartFileNumber 3
+ disableImplicitCasting 1
+ eml {
+ name "f0"
+ }
+ }
+ state {
+ id 19
+ labelString "eML_blk_kernel()"
+ position [18 64.5 118 66]
+ fontSize 12
+ chart 18
+ treeNode [18 0 0 0]
+ superState SUBCHART
+ subviewer 18
+ ssIdNumber 1
+ type FUNC_STATE
+ decomposition CLUSTER_STATE
+ eml {
+ isEML 1
+ script "function yout = f0(t,x,y)\n%#codegen\nyout = (-5*sin(t)*(x-5*cos(t))+5*cos(t)*(y-5*sin(t)))/(x-5*"
+ "cos(t))^2+(y-5*sin(t))^2;"
+ editorLayout "100 M4x1[10 5 700 500]"
+ }
+ }
+ junction {
+ id 20
+ position [23.5747 49.5747 7]
+ chart 18
+ linkNode [18 0 0]
+ subviewer 18
+ ssIdNumber 3
+ type CONNECTIVE_JUNCTION
+ }
+ transition {
+ id 21
+ labelString "{eML_blk_kernel();}"
+ labelPosition [32.125 19.875 102.544 14.964]
+ fontSize 12
+ src {
+ intersection [0 0 1 0 23.5747 14.625 0 0]
+ }
+ dst {
+ id 20
+ intersection [7 0 -1 -1 23.5747 42.5747 0 0]
+ }
+ midPoint [23.5747 24.9468]
+ chart 18
+ linkNode [18 0 0]
+ dataLimits [23.575 23.575 14.625 34.575]
+ subviewer 18
+ drawStyle SMART
+ executionOrder 1
+ ssIdNumber 2
+ }
+ data {
+ id 22
+ ssIdNumber 4
+ name "t"
+ linkNode [18 0 23]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 23
+ ssIdNumber 6
+ name "x"
+ linkNode [18 22 24]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_INHERITED
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 24
+ ssIdNumber 5
+ name "y"
+ linkNode [18 23 25]
+ scope INPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ data {
+ id 25
+ ssIdNumber 7
+ name "yout"
+ linkNode [18 24 0]
+ scope OUTPUT_DATA
+ machine 1
+ props {
+ array {
+ size "-1"
+ }
+ type {
+ method SF_INHERITED_TYPE
+ primitive SF_DOUBLE_TYPE
+ isSigned 1
+ wordLength "16"
+ }
+ complexity SF_COMPLEX_INHERITED
+ frame SF_FRAME_NO
+ }
+ dataType "Inherit: Same as Simulink"
+ }
+ instance {
+ id 26
+ name "MATLAB Function2"
+ machine 1
+ chart 18
+ }
+ target {
+ id 27
+ name "sfun"
+ description "Default Simulink S-Function Target."
+ machine 1
+ linkNode [1 0 0]
+ }
+}
diff --git a/ws2012/CE/uebungen/P5/P5Graph.m b/ws2012/CE/uebungen/P5/P5Graph.m
new file mode 100644
index 00000000..c558638f
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/P5Graph.m
@@ -0,0 +1,15 @@
+function yout = P5Graph()
+ %assignin('base','x0',x0_workspace);
+ %assignin('base','y0',y0_workspace);
+
+
+ % --> Fehler war in der .mdl. Ouput muss als Array definiert werden. Somit bekommen wir jetzt auch die Zeichnungen, die
+ % die Jungs bekommen ;) Schönen Tag noch !!!
+
+ sim('P5')
+ %figure(1)
+ plot(x_out, y_out);
+ title('')
+ ylabel('')
+ xlabel('');
+
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/P5/P5_sfun.mexa64 b/ws2012/CE/uebungen/P5/P5_sfun.mexa64
new file mode 100755
index 00000000..7b241018
Binary files /dev/null and b/ws2012/CE/uebungen/P5/P5_sfun.mexa64 differ
diff --git a/ws2012/CE/uebungen/P5/graphik_erster_versuch.pdf b/ws2012/CE/uebungen/P5/graphik_erster_versuch.pdf
new file mode 100644
index 00000000..0b859f19
Binary files /dev/null and b/ws2012/CE/uebungen/P5/graphik_erster_versuch.pdf differ
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/binfo.mat b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/binfo.mat
new file mode 100644
index 00000000..719c3e7e
Binary files /dev/null and b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/binfo.mat differ
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/chart1_cMg4GJAMQ9ltkvk2Z8cpJB.mat b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/chart1_cMg4GJAMQ9ltkvk2Z8cpJB.mat
new file mode 100644
index 00000000..93ca29d0
Binary files /dev/null and b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/chart1_cMg4GJAMQ9ltkvk2Z8cpJB.mat differ
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/chart2_KwJhPuBtuwXq2wvLZJqQcC.mat b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/chart2_KwJhPuBtuwXq2wvLZJqQcC.mat
new file mode 100644
index 00000000..bb183a58
Binary files /dev/null and b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/chart2_KwJhPuBtuwXq2wvLZJqQcC.mat differ
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/chart3_gpOr5Mp2v1rgV5xrLnEACD.mat b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/chart3_gpOr5Mp2v1rgV5xrLnEACD.mat
new file mode 100644
index 00000000..991fd081
Binary files /dev/null and b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/info/chart3_gpOr5Mp2v1rgV5xrLnEACD.mat differ
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.c b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.c
new file mode 100644
index 00000000..e9e1c32d
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.c
@@ -0,0 +1,308 @@
+/* Include files */
+
+#include "P5_sfun.h"
+#include "c1_P5.h"
+#include "c2_P5.h"
+#include "c3_P5.h"
+
+/* Type Definitions */
+
+/* Named Constants */
+
+/* Variable Declarations */
+
+/* Variable Definitions */
+uint32_T _P5MachineNumber_;
+real_T _sfTime_;
+
+/* Function Declarations */
+
+/* Function Definitions */
+void P5_initializer(void)
+{
+}
+
+void P5_terminator(void)
+{
+}
+
+/* SFunction Glue Code */
+unsigned int sf_P5_method_dispatcher(SimStruct *simstructPtr, unsigned int
+ chartFileNumber, const char* specsCksum, int_T method, void *data)
+{
+ if (chartFileNumber==1) {
+ c1_P5_method_dispatcher(simstructPtr, method, data);
+ return 1;
+ }
+
+ if (chartFileNumber==2) {
+ c2_P5_method_dispatcher(simstructPtr, method, data);
+ return 1;
+ }
+
+ if (chartFileNumber==3) {
+ c3_P5_method_dispatcher(simstructPtr, method, data);
+ return 1;
+ }
+
+ return 0;
+}
+
+unsigned int sf_P5_process_check_sum_call( int nlhs, mxArray * plhs[], int nrhs,
+ const mxArray * prhs[] )
+{
+
+#ifdef MATLAB_MEX_FILE
+
+ char commandName[20];
+ if (nrhs<1 || !mxIsChar(prhs[0]) )
+ return 0;
+
+ /* Possible call to get the checksum */
+ mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char));
+ commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
+ if (strcmp(commandName,"sf_get_check_sum"))
+ return 0;
+ plhs[0] = mxCreateDoubleMatrix( 1,4,mxREAL);
+ if (nrhs>1 && mxIsChar(prhs[1])) {
+ mxGetString(prhs[1], commandName,sizeof(commandName)/sizeof(char));
+ commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
+ if (!strcmp(commandName,"machine")) {
+ ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(598975512U);
+ ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(4043443093U);
+ ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(1436235186U);
+ ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(1468335051U);
+ } else if (!strcmp(commandName,"exportedFcn")) {
+ ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(0U);
+ ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(0U);
+ ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(0U);
+ ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(0U);
+ } else if (!strcmp(commandName,"makefile")) {
+ ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(4255499797U);
+ ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(2481545010U);
+ ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(1571995356U);
+ ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(1135673318U);
+ } else if (nrhs==3 && !strcmp(commandName,"chart")) {
+ unsigned int chartFileNumber;
+ chartFileNumber = (unsigned int)mxGetScalar(prhs[2]);
+ switch (chartFileNumber) {
+ case 1:
+ {
+ extern void sf_c1_P5_get_check_sum(mxArray *plhs[]);
+ sf_c1_P5_get_check_sum(plhs);
+ break;
+ }
+
+ case 2:
+ {
+ extern void sf_c2_P5_get_check_sum(mxArray *plhs[]);
+ sf_c2_P5_get_check_sum(plhs);
+ break;
+ }
+
+ case 3:
+ {
+ extern void sf_c3_P5_get_check_sum(mxArray *plhs[]);
+ sf_c3_P5_get_check_sum(plhs);
+ break;
+ }
+
+ default:
+ ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(0.0);
+ ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(0.0);
+ ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(0.0);
+ ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(0.0);
+ }
+ } else if (!strcmp(commandName,"target")) {
+ ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(1764838350U);
+ ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(3410240878U);
+ ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(118138738U);
+ ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(243351119U);
+ } else {
+ return 0;
+ }
+ } else {
+ ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(2467651478U);
+ ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(2504142793U);
+ ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(1979193546U);
+ ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(3793771167U);
+ }
+
+ return 1;
+
+#else
+
+ return 0;
+
+#endif
+
+}
+
+unsigned int sf_P5_autoinheritance_info( int nlhs, mxArray * plhs[], int nrhs,
+ const mxArray * prhs[] )
+{
+
+#ifdef MATLAB_MEX_FILE
+
+ char commandName[32];
+ char aiChksum[64];
+ if (nrhs<3 || !mxIsChar(prhs[0]) )
+ return 0;
+
+ /* Possible call to get the autoinheritance_info */
+ mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char));
+ commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
+ if (strcmp(commandName,"get_autoinheritance_info"))
+ return 0;
+ mxGetString(prhs[2], aiChksum,sizeof(aiChksum)/sizeof(char));
+ aiChksum[(sizeof(aiChksum)/sizeof(char)-1)] = '\0';
+
+ {
+ unsigned int chartFileNumber;
+ chartFileNumber = (unsigned int)mxGetScalar(prhs[1]);
+ switch (chartFileNumber) {
+ case 1:
+ {
+ if (strcmp(aiChksum, "T1ccuYYHxoUvp3qes1AHgC") == 0) {
+ extern mxArray *sf_c1_P5_get_autoinheritance_info(void);
+ plhs[0] = sf_c1_P5_get_autoinheritance_info();
+ break;
+ }
+
+ plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL);
+ break;
+ }
+
+ case 2:
+ {
+ if (strcmp(aiChksum, "OfvxwTNBO5vBbV6MicOfOG") == 0) {
+ extern mxArray *sf_c2_P5_get_autoinheritance_info(void);
+ plhs[0] = sf_c2_P5_get_autoinheritance_info();
+ break;
+ }
+
+ plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL);
+ break;
+ }
+
+ case 3:
+ {
+ if (strcmp(aiChksum, "7kbJwhOiUtMRzVQwHCKTGB") == 0) {
+ extern mxArray *sf_c3_P5_get_autoinheritance_info(void);
+ plhs[0] = sf_c3_P5_get_autoinheritance_info();
+ break;
+ }
+
+ plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL);
+ break;
+ }
+
+ default:
+ plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL);
+ }
+ }
+
+ return 1;
+
+#else
+
+ return 0;
+
+#endif
+
+}
+
+unsigned int sf_P5_get_eml_resolved_functions_info( int nlhs, mxArray * plhs[],
+ int nrhs, const mxArray * prhs[] )
+{
+
+#ifdef MATLAB_MEX_FILE
+
+ char commandName[64];
+ if (nrhs<2 || !mxIsChar(prhs[0]))
+ return 0;
+
+ /* Possible call to get the get_eml_resolved_functions_info */
+ mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char));
+ commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
+ if (strcmp(commandName,"get_eml_resolved_functions_info"))
+ return 0;
+
+ {
+ unsigned int chartFileNumber;
+ chartFileNumber = (unsigned int)mxGetScalar(prhs[1]);
+ switch (chartFileNumber) {
+ case 1:
+ {
+ extern const mxArray *sf_c1_P5_get_eml_resolved_functions_info(void);
+ mxArray *persistentMxArray = (mxArray *)
+ sf_c1_P5_get_eml_resolved_functions_info();
+ plhs[0] = mxDuplicateArray(persistentMxArray);
+ mxDestroyArray(persistentMxArray);
+ break;
+ }
+
+ case 2:
+ {
+ extern const mxArray *sf_c2_P5_get_eml_resolved_functions_info(void);
+ mxArray *persistentMxArray = (mxArray *)
+ sf_c2_P5_get_eml_resolved_functions_info();
+ plhs[0] = mxDuplicateArray(persistentMxArray);
+ mxDestroyArray(persistentMxArray);
+ break;
+ }
+
+ case 3:
+ {
+ extern const mxArray *sf_c3_P5_get_eml_resolved_functions_info(void);
+ mxArray *persistentMxArray = (mxArray *)
+ sf_c3_P5_get_eml_resolved_functions_info();
+ plhs[0] = mxDuplicateArray(persistentMxArray);
+ mxDestroyArray(persistentMxArray);
+ break;
+ }
+
+ default:
+ plhs[0] = mxCreateDoubleMatrix(0,0,mxREAL);
+ }
+ }
+
+ return 1;
+
+#else
+
+ return 0;
+
+#endif
+
+}
+
+void P5_debug_initialize(void)
+{
+ _P5MachineNumber_ = sf_debug_initialize_machine("P5","sfun",0,3,0,0,0);
+ sf_debug_set_machine_event_thresholds(_P5MachineNumber_,0,0);
+ sf_debug_set_machine_data_thresholds(_P5MachineNumber_,0);
+}
+
+void P5_register_exported_symbols(SimStruct* S)
+{
+}
+
+static mxArray* sRtwOptimizationInfoStruct= NULL;
+mxArray* load_P5_optimization_info(void)
+{
+ if (sRtwOptimizationInfoStruct==NULL) {
+ sRtwOptimizationInfoStruct = sf_load_rtw_optimization_info("P5", "P5");
+ mexMakeArrayPersistent(sRtwOptimizationInfoStruct);
+ }
+
+ return(sRtwOptimizationInfoStruct);
+}
+
+void unload_P5_optimization_info(void)
+{
+ if (sRtwOptimizationInfoStruct!=NULL) {
+ mxDestroyArray(sRtwOptimizationInfoStruct);
+ sRtwOptimizationInfoStruct = NULL;
+ }
+}
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.h b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.h
new file mode 100644
index 00000000..8b5df2d5
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.h
@@ -0,0 +1,40 @@
+#ifndef __P5_sfun_h__
+#define __P5_sfun_h__
+
+/* Include files */
+#define S_FUNCTION_NAME sf_sfun
+#include "sfc_sf.h"
+#include "sfc_mex.h"
+#include "rtwtypes.h"
+#include "sfcdebug.h"
+#define rtInf (mxGetInf())
+#define rtMinusInf (-(mxGetInf()))
+#define rtNaN (mxGetNaN())
+#define rtIsNaN(X) ((int)mxIsNaN(X))
+#define rtIsInf(X) ((int)mxIsInf(X))
+
+/* Type Definitions */
+
+/* Named Constants */
+
+/* Variable Declarations */
+extern uint32_T _P5MachineNumber_;
+extern real_T _sfTime_;
+
+/* Variable Definitions */
+
+/* Function Declarations */
+extern void P5_initializer(void);
+extern void P5_terminator(void);
+
+/* Function Definitions */
+
+/* We load infoStruct for rtw_optimation_info on demand in mdlSetWorkWidths and
+ free it immediately in mdlStart. Given that this is machine-wide as
+ opposed to chart specific, we use NULL check to make sure it gets loaded
+ and unloaded once per machine even though the methods mdlSetWorkWidths/mdlStart
+ are chart/instance specific. The following methods abstract this out. */
+extern mxArray* load_P5_optimization_info(void);
+extern void unload_P5_optimization_info(void);
+
+#endif
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.mku b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.mku
new file mode 100644
index 00000000..6e787f97
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.mku
@@ -0,0 +1,97 @@
+#--------------------------- Tool Specifications -------------------------
+#
+# Modify the following macros to reflect the tools you wish to use for
+# compiling and linking your code.
+#
+CC = /usr/local/MATLAB/R2012a/bin/mex
+LD = $(CC)
+
+MACHINE = P5
+TARGET = sfun
+CHART_SRCS = \
+ c1_P5.c\
+ c2_P5.c\
+ c3_P5.c
+MACHINE_SRC = P5_sfun.c
+MACHINE_REG = P5_sfun_registry.c
+MEX_WRAPPER =
+MAKEFILE = P5_sfun.mku
+MATLAB_ROOT = /usr/local/MATLAB/R2012a/toolbox/stateflow/stateflow/../../..
+BUILDARGS =
+#------------------------------ Include/Lib Path ------------------------------
+
+USER_INCLUDES =
+AUX_INCLUDES =
+MATLAB_INCLUDES = -I$(MATLAB_ROOT)/simulink/include \
+ -I$(MATLAB_ROOT)/extern/include \
+ -I/usr/local/MATLAB/R2012a/stateflow/c/mex/include \
+ -I/usr/local/MATLAB/R2012a/stateflow/c/debugger/include
+
+DSP_INCLUDES =
+
+INCLUDE_PATH = $(MATLAB_INCLUDES) $(DSP_INCLUDES) $(COMPILER_INCLUDES)
+
+#----------------- Compiler and Linker Options --------------------------------
+
+# Optimization Options
+OPT_OPTS = -O
+
+# Parallel Options
+PAR_OPTS =
+
+# General User Options
+OPTS =
+
+CC_OPTS = $(OPT_OPTS) $(OPTS) $(PAR_OPTS)
+CPP_REQ_DEFINES = -DMATLAB_MEX_FILE
+
+# Uncomment this line to move warning level to W4
+# cflags = $(cflags:W3=W4)
+CFLAGS = $(CC_OPTS) $(CPP_REQ_DEFINES) $(INCLUDE_PATH)
+
+LDFLAGS =
+
+AUXLDFLAGS =
+#----------------------------- Source Files -----------------------------------
+
+REQ_SRCS = $(MACHINE_SRC) $(MACHINE_REG) $(MEX_WRAPPER) $(CHART_SRCS)
+
+USER_ABS_OBJS =
+
+AUX_ABS_OBJS =
+REQ_OBJS = $(REQ_SRCS:.cpp=.o)
+REQ_OBJS2 = $(REQ_OBJS:.c=.o)
+OBJS = $(REQ_OBJS2) $(USER_ABS_OBJS) $(AUX_ABS_OBJS)
+OBJLIST_FILE = P5_sfun.mol
+SFCLIB = /usr/local/MATLAB/R2012a/stateflow/c/mex/lib/glnxa64/sfc_mex.a /usr/local/MATLAB/R2012a/stateflow/c/debugger/lib/glnxa64/sfc_debug.a
+AUX_LNK_OBJS =
+USER_LIBS =
+LINK_MACHINE_LIBS =
+FIXEDPOINTLIB = -L/usr/local/MATLAB/R2012a/bin/glnxa64 -lfixedpoint
+UTLIB = -lut
+EMLRTLIB = -lemlrt
+MWMATHUTILLIB = -lmwmathutil
+BLASLIB= -lmwblascompat32
+IPPLIB = -L/usr/local/MATLAB/R2012a/bin/glnxa64 -lippmwipt
+PARLIB =
+ MAPCSF = /usr/local/MATLAB/R2012a/tools/glnxa64/mapcsf
+ # RUN_MAPCSF_ON_UNIX is defined only if MAPCSF exists on this platform.
+ ifneq ($(wildcard $(MAPCSF)),) # run MAPCSF if it exists on this platform
+ RUN_MAPCSF_ON_UNIX = /usr/local/MATLAB/R2012a/tools/glnxa64/mapcsf $@
+ endif
+
+#--------------------------------- Rules --------------------------------------
+
+MEX_FILE_NAME = $(MACHINE)_$(TARGET).mexa64
+
+ $(MEX_FILE_NAME): $(MAKEFILE) $(OBJS) $(SFCLIB) $(AUX_LNK_OBJS) $(USER_LIBS) $(MEXLIB)
+ @echo ### Linking ...
+ $(CC) -silent LDFLAGS="\$$LDFLAGS $(AUXLDFLAGS)" -output $(MEX_FILE_NAME) $(OBJS) $(AUX_LNK_OBJS) $(USER_LIBS) $(LINK_MACHINE_LIBS) $(SFCLIB) $(FIXEDPOINTLIB) $(UTLIB) $(MWMATHUTILLIB) $(EMLRTLIB) $(BLASLIB) $(PARLIB) $(IPPLIB)
+ $(RUN_MAPCSF_ON_UNIX)
+
+%.o : %.c
+ $(CC) -c $(CFLAGS) $<
+
+%.o : %.cpp
+ $(CC) -c $(CFLAGS) $<
+
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.mol b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.mol
new file mode 100644
index 00000000..b9281591
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.mol
@@ -0,0 +1,5 @@
+c1_P5.obj
+c2_P5.obj
+c3_P5.obj
+P5_sfun_registry.obj
+P5_sfun.obj
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.o b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.o
new file mode 100644
index 00000000..a2c906c6
Binary files /dev/null and b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun.o differ
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun_debug_macros.h b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun_debug_macros.h
new file mode 100644
index 00000000..a1400130
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun_debug_macros.h
@@ -0,0 +1,354 @@
+#ifndef __SF_DEBUG_MACROS_H__
+#define __SF_DEBUG_MACROS_H__
+
+extern unsigned int _P5MachineNumber_;
+#define _SFD_SET_DATA_VALUE_PTR(v1,v2)\
+ sf_debug_set_instance_data_value_ptr(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,v1,(void *)(v2),NULL);
+#define _SFD_UNSET_DATA_VALUE_PTR(v1)\
+ sf_debug_unset_instance_data_value_ptr(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,v1);
+#define _SFD_SET_DATA_VALUE_PTR_VAR_DIM(v1,v2,v3)\
+ sf_debug_set_instance_data_value_ptr(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,v1,(void *)(v2),(void *)(v3));
+#define _SFD_DATA_RANGE_CHECK_MIN_MAX(dVal,dNum,dMin,dMax)\
+ sf_debug_data_range_error_wrapper_min_max(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ dNum,(double)(dVal),(double)dMin,(double)dMax)
+#define _SFD_DATA_RANGE_CHECK_MIN(dVal,dNum,dMin)\
+ sf_debug_data_range_error_wrapper_min(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ dNum,(double)(dVal),(double)dMin)
+#define _SFD_DATA_RANGE_CHECK_MAX(dVal,dNum,dMax)\
+ sf_debug_data_range_error_wrapper_max(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ dNum,(double)(dVal),(double)dMax)
+#define _SFD_DATA_RANGE_CHECK(dVal,dNum)\
+ sf_debug_data_range_wrapper(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ dNum,(double)(dVal))
+#define _SFD_DATA_READ_BEFORE_WRITE_CHECK(dNum,dVal)\
+ sf_debug_read_before_write_check(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (unsigned int)(dNum),(bool)dVal)
+#define _SFD_ARRAY_BOUNDS_CHECK(v1,v2,v3,v4,v5,v6) \
+ sf_debug_data_array_bounds_error_check(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(int)(v2),(int)(v3),(int)(v4),(int)(v5),(int)(v6))
+#define _SFD_RUNTIME_SIZE_MISMATCH_CHECK(v1,v2,v3,v4,v5) \
+ sf_debug_data_runtime_size_mismatch_error_check(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(unsigned int)(v3),(int)(v4),(int)(v5))
+#define _SFD_EML_ARRAY_BOUNDS_CHECK(v1,v2,v3,v4,v5,v6) \
+ sf_debug_eml_data_array_bounds_error_check(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(int)(v2),(int)(v3),(int)(v4),(int)(v5),(int)(v6))
+#define _SFD_INTEGER_CHECK(v1,v2) \
+ sf_debug_integer_check(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(double)(v2))
+#define _SFD_NOT_NAN_CHECK(v1,v2) \
+ sf_debug_not_nan_check(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(double)(v2))
+#define _SFD_NON_NEGATIVE_CHECK(v1,v2) \
+ sf_debug_non_negative_check(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(double)(v2))
+#define _SFD_CAST_TO_UINT8(v1) \
+ sf_debug_cast_to_uint8_T(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),0,0)
+#define _SFD_CAST_TO_UINT16(v1) \
+ sf_debug_cast_to_uint16_T(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),0,0)
+#define _SFD_CAST_TO_UINT32(v1) \
+ sf_debug_cast_to_uint32_T(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),0,0)
+#define _SFD_CAST_TO_INT8(v1) \
+ sf_debug_cast_to_int8_T(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),0,0)
+#define _SFD_CAST_TO_INT16(v1) \
+ sf_debug_cast_to_int16_T(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),0,0)
+#define _SFD_CAST_TO_INT32(v1) \
+ sf_debug_cast_to_int32_T(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),0,0)
+#define _SFD_CAST_TO_SINGLE(v1) \
+ sf_debug_cast_to_real32_T(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),0,0)
+#define _SFD_TRANSITION_CONFLICT(v1,v2) sf_debug_transition_conflict_error(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+v1,v2)
+#define _SFD_ANIMATE() sf_debug_animate(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER)
+#define _SFD_CHART_CALL(v1,v2,v3,v4) sf_debug_call(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+CHART_OBJECT,v1,v2,v3,v4,\
+0,NULL,_sfTime_,1)
+#define _SFD_CC_CALL(v2,v3,v4) _SFD_CHART_CALL(CHART_OBJECT,v2,v3,v4)
+#define _SFD_CS_CALL(v2,v3,v4) _SFD_CHART_CALL(STATE_OBJECT,v2,v3,v4)
+#define _SFD_CT_CALL(v2,v3,v4) _SFD_CHART_CALL(TRANSITION_OBJECT,v2,v3,v4)
+#define _SFD_CE_CALL(v2,v3,v4) _SFD_CHART_CALL(EVENT_OBJECT,v2,v3,v4)
+#define _SFD_EML_CALL(v1,v2,v3) eml_debug_line_call(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+v1,v2,\
+v3,_sfTime_,0)
+#define _SFD_SCRIPT_TRANSLATION(v1,v2,v3) sf_debug_set_script_translation(_P5MachineNumber_,\
+v1,v2,v3)
+#define _SFD_SCRIPT_CALL(v1,v2,v3) eml_debug_line_call(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+v1,v2,\
+v3,_sfTime_,1)
+#define _SFD_CCP_CALL(v3,v4,v5,v6) sf_debug_call(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+CHART_OBJECT,TRANSITION_OBJECT,TRANSITION_GUARD_COVERAGE_TAG,v3,v6,\
+v4,NULL,_sfTime_,(unsigned int)(v5))
+#define _SFD_STATE_TEMPORAL_THRESHOLD(v1,v2,v4) sf_debug_temporal_threshold(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+(unsigned int)(v1),(v2),STATE_OBJECT,(v4))
+#define _SFD_TRANS_TEMPORAL_THRESHOLD(v1,v2,v4) sf_debug_temporal_threshold(_P5MachineNumber_,\
+CHARTINSTANCE_CHARTNUMBER,\
+CHARTINSTANCE_INSTANCENUMBER,\
+(unsigned int)(v1),(v2),TRANSITION_OBJECT,(v4))
+#define CV_EVAL(v1,v2,v3,v4) cv_eval_point(_P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(boolean_T)(v4))
+#define CV_CHART_EVAL(v2,v3,v4) CV_EVAL(CHART_OBJECT,(v2),(v3),(v4))
+#define CV_STATE_EVAL(v2,v3,v4) CV_EVAL(STATE_OBJECT,(v2),(v3),(v4))
+#define CV_TRANSITION_EVAL(v1,v2) cv_eval_point(_P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ TRANSITION_OBJECT,(v1),0,((v2)!=0))
+#define CV_TESTOBJECTIVE_EVAL(v1,v2,v3,v4) cv_eval_testobjective(_P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4))
+
+/* Coverage Macros for MATLAB */
+#define CV_EML_EVAL(v1,v2,v3,v4,v5) cv_eml_eval(_P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(int)(v5))
+#define CV_EML_FCN(v2,v3) CV_EML_EVAL(CV_EML_FCN_CHECK,(v2),1,(v3),0)
+#define CV_EML_TESTOBJECTIVE(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_TESTOBJECTIVE_CHECK,(v2),(v3),(v4),((v5) != 0))
+#define CV_EML_IF(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_IF_CHECK,(v2),(v3),(v4),((v5) != 0))
+#define CV_EML_FOR(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_FOR_CHECK,(v2),(v3),(v4),(v5))
+#define CV_EML_WHILE(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_WHILE_CHECK,(v2),(v3),(v4),((v5) != 0))
+#define CV_EML_SWITCH(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_SWITCH_CHECK,(v2),(v3),(v4),(v5))
+#define CV_EML_COND(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_COND_CHECK,(v2),(v3),(v4),((v5) != 0))
+#define CV_EML_MCDC(v2,v3,v4,v5) CV_EML_EVAL(CV_EML_MCDC_CHECK,(v2),(v3),(v4),(v5))
+#define CV_SCRIPT_EVAL(v1,v2,v3,v4) cv_script_eval(_P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(int)(v4))
+#define CV_SCRIPT_FCN(v2,v3) CV_SCRIPT_EVAL(CV_SCRIPT_FCN_CHECK,(v2),(v3),0)
+#define CV_SCRIPT_TESTOBJECTIVE(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_TESTOBJECTIVE_CHECK,(v2),(v3),((v4) != 0))
+#define CV_SCRIPT_IF(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_IF_CHECK,(v2),(v3),((v4) != 0))
+#define CV_SCRIPT_FOR(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_FOR_CHECK,(v2),(v3),(v4))
+#define CV_SCRIPT_WHILE(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_WHILE_CHECK,(v2),(v3),((v4) != 0))
+#define CV_SCRIPT_SWITCH(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_SWITCH_CHECK,(v2),(v3),(v4))
+#define CV_SCRIPT_COND(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_COND_CHECK,(v2),(v3),((v4) != 0))
+#define CV_SCRIPT_MCDC(v2,v3,v4) CV_SCRIPT_EVAL(CV_SCRIPT_MCDC_CHECK,(v2),(v3),(v4))
+
+#define _SFD_CV_INIT_EML(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10) cv_eml_init_script(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9),(v10))
+
+#define _SFD_CV_INIT_EML_FCN(v1,v2,v3,v4,v5,v6) cv_eml_init_fcn(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6))
+
+#define _SFD_CV_INIT_EML_TESTOBJECTIVE(v1,v2,v3,v4,v5,v6,v7) cv_eml_init_testobjective(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6),(v7))
+
+#define _SFD_CV_INIT_EML_IF(v1,v2,v3,v4,v5,v6,v7) cv_eml_init_if(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6),(v7))
+
+#define _SFD_CV_INIT_EML_FOR(v1,v2,v3,v4,v5,v6) cv_eml_init_for(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6))
+
+#define _SFD_CV_INIT_EML_WHILE(v1,v2,v3,v4,v5,v6) cv_eml_init_while(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6))
+
+#define _SFD_CV_INIT_EML_MCDC(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11) cv_eml_init_mcdc(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9),(v10),(v11))
+
+#define _SFD_CV_INIT_EML_SWITCH(v1,v2,v3,v4,v5,v6,v7,v8,v9) cv_eml_init_switch(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9))
+
+#define _SFD_CV_INIT_SCRIPT(v1,v2,v3,v4,v5,v6,v7,v8,v9) cv_script_init_script(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9))
+
+#define _SFD_CV_INIT_SCRIPT_FCN(v1,v2,v3,v4,v5,v6) cv_script_init_fcn(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6))
+
+#define _SFD_CV_INIT_SCRIPT_TESTOBJECTIVE(v1,v2,v3,v4,v5,v6) cv_script_init_testobjective(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6))
+
+#define _SFD_CV_INIT_SCRIPT_IF(v1,v2,v3,v4,v5,v6) cv_script_init_if(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6))
+
+#define _SFD_CV_INIT_SCRIPT_FOR(v1,v2,v3,v4,v5) cv_script_init_for(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5))
+
+#define _SFD_CV_INIT_SCRIPT_WHILE(v1,v2,v3,v4,v5) cv_script_init_while(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5))
+
+#define _SFD_CV_INIT_SCRIPT_MCDC(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10) cv_script_init_mcdc(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9),(v10))
+
+#define _SFD_CV_INIT_SCRIPT_SWITCH(v1,v2,v3,v4,v5,v6,v7,v8) cv_script_init_switch(\
+ _P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8))
+
+
+#define _SFD_SET_DATA_PROPS(dataNumber,dataScope,isInputData,isOutputData,dataName)\
+ sf_debug_set_chart_data_props(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,\
+ (dataNumber),(dataScope),(isInputData),(isOutputData),(dataName))
+#define _SFD_SET_DATA_COMPILED_PROPS(dataNumber,dataType,numDims,dimArray,isFixedPoint,isSigned,wordLength,bias,slope,exponent,complexity,mexOutFcn, mexInFcn)\
+ sf_debug_set_chart_data_compiled_props(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,\
+ (dataNumber),(dataType),(numDims),(dimArray),(isFixedPoint),(isSigned),(wordLength),(bias),(slope),(exponent),(complexity),(mexOutFcn),(mexInFcn))
+#define _SFD_STATE_INFO(v1,v2,v3)\
+ sf_debug_set_chart_state_info(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2),(v3))
+#define _SFD_CH_SUBSTATE_INDEX(v1,v2)\
+ sf_debug_set_chart_substate_index(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2))
+#define _SFD_ST_SUBSTATE_INDEX(v1,v2,v3)\
+ sf_debug_set_chart_state_substate_index(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2),(v3))
+#define _SFD_ST_SUBSTATE_COUNT(v1,v2)\
+ sf_debug_set_chart_state_substate_count(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1),(v2))
+#define _SFD_STATE_COV_WTS(v1,v2,v3,v4)\
+ sf_debug_set_instance_state_coverage_weights(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,(v1),(v2),(v3),(v4))
+#define _SFD_STATE_COV_MAPS(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10) \
+ sf_debug_set_chart_state_coverage_maps(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8),(v9),(v10))
+#define _SFD_TRANS_COV_WTS(v1,v2,v3,v4,v5) \
+ sf_debug_set_instance_transition_coverage_weights(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5))
+#define _SFD_TRANS_COV_MAPS(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13) \
+ sf_debug_set_chart_transition_coverage_maps(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,\
+ (v1),\
+ (v2),(v3),(v4),\
+ (v5),(v6),(v7),\
+ (v8),(v9),(v10),\
+ (v11),(v12),(v13))
+
+#define _SFD_DATA_CHANGE_EVENT_COUNT(v1,v2) \
+ sf_debug_set_number_of_data_with_change_event_for_chart(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,\
+ (v1),(v2))
+#define _SFD_STATE_ENTRY_EVENT_COUNT(v1,v2) \
+ sf_debug_set_number_of_states_with_entry_event_for_chart(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,\
+ (v1),(v2))
+#define _SFD_STATE_EXIT_EVENT_COUNT(v1,v2) \
+ sf_debug_set_number_of_states_with_exit_event_for_chart(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,\
+ (v1),(v2))
+#define _SFD_EVENT_SCOPE(v1,v2)\
+ sf_debug_set_chart_event_scope(_P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,(v1),(v2))
+
+#define _SFD_CH_SUBSTATE_COUNT(v1) \
+ sf_debug_set_chart_substate_count(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1))
+#define _SFD_CH_SUBSTATE_DECOMP(v1) \
+ sf_debug_set_chart_decomposition(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,(v1))
+
+#define _SFD_CV_INIT_CHART(v1,v2,v3,v4)\
+ sf_debug_cv_init_chart(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,(v1),(v2),(v3),(v4))
+
+#define _SFD_CV_INIT_STATE(v1,v2,v3,v4,v5,v6,v7,v8)\
+ sf_debug_cv_init_state(_P5MachineNumber_,CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,(v1),(v2),(v3),(v4),(v5),(v6),(v7),(v8))
+
+#define _SFD_CV_INIT_TRANSITION_TESTOBJECTIVE(v1,v2,v3,v4)\
+ sf_debug_cv_init_testobjectives(_P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ TRANSITION_OBJECT,(v1),(v2),(v3),(v4))
+
+#define _SFD_CV_INIT_STATE_TESTOBJECTIVE(v1,v2,v3,v4)\
+ sf_debug_cv_init_testobjectives(_P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ STATE_OBJECT, (v1),(v2),(v3),(v4))
+
+#define _SFD_CV_INIT_TRANS(v1,v2,v3,v4,v5,v6)\
+ sf_debug_cv_init_trans(_P5MachineNumber_,\
+ CHARTINSTANCE_CHARTNUMBER,\
+ CHARTINSTANCE_INSTANCENUMBER,\
+ (v1),(v2),(v3),(v4),(v5),(v6))
+#endif
+
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun_registry.c b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun_registry.c
new file mode 100644
index 00000000..e3286723
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun_registry.c
@@ -0,0 +1,283 @@
+#include "P5_sfun.h"
+#include "sfcdebug.h"
+#define PROCESS_MEX_SFUNCTION_CMD_LINE_CALL
+
+unsigned int sf_process_check_sum_call( int nlhs, mxArray * plhs[], int nrhs,
+ const mxArray * prhs[] )
+{
+ extern unsigned int sf_P5_process_check_sum_call( int nlhs, mxArray * plhs[],
+ int nrhs, const mxArray * prhs[] );
+ if (sf_P5_process_check_sum_call(nlhs,plhs,nrhs,prhs))
+ return 1;
+ return 0;
+}
+
+unsigned int sf_process_autoinheritance_call( int nlhs, mxArray * plhs[], int
+ nrhs, const mxArray * prhs[] )
+{
+ extern unsigned int sf_P5_autoinheritance_info( int nlhs, mxArray * plhs[],
+ int nrhs, const mxArray * prhs[] );
+ char commandName[64];
+ char machineName[128];
+ if (nrhs < 4) {
+ return 0;
+ }
+
+ if (!mxIsChar(prhs[0]) || !mxIsChar(prhs[1]))
+ return 0;
+ mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char));
+ commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
+ if (strcmp(commandName,"get_autoinheritance_info"))
+ return 0;
+ mxGetString(prhs[1], machineName,sizeof(machineName)/sizeof(char));
+ machineName[(sizeof(machineName)/sizeof(char)-1)] = '\0';
+ if (strcmp(machineName, "P5") == 0) {
+ const mxArray *newRhs[3] = { NULL, NULL, NULL };
+
+ newRhs[0] = prhs[0];
+ newRhs[1] = prhs[2];
+ newRhs[2] = prhs[3];
+ return sf_P5_autoinheritance_info(nlhs,plhs,3,newRhs);
+ }
+
+ return 0;
+}
+
+unsigned int sf_process_get_eml_resolved_functions_info_call( int nlhs, mxArray *
+ plhs[], int nrhs, const mxArray * prhs[] )
+{
+ extern unsigned int sf_P5_get_eml_resolved_functions_info( int nlhs, mxArray *
+ plhs[], int nrhs, const mxArray * prhs[] );
+ char commandName[64];
+ char machineName[128];
+ if (nrhs < 3) {
+ return 0;
+ }
+
+ if (!mxIsChar(prhs[0]) || !mxIsChar(prhs[1]))
+ return 0;
+ mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char));
+ commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
+ if (strcmp(commandName,"get_eml_resolved_functions_info"))
+ return 0;
+ mxGetString(prhs[1], machineName,sizeof(machineName)/sizeof(char));
+ machineName[(sizeof(machineName)/sizeof(char)-1)] = '\0';
+ if (strcmp(machineName, "P5") == 0) {
+ const mxArray *newRhs[2] = { NULL, NULL };
+
+ newRhs[0] = prhs[0];
+ newRhs[1] = prhs[2];
+ return sf_P5_get_eml_resolved_functions_info(nlhs,plhs,2,newRhs);
+ }
+
+ return 0;
+}
+
+unsigned int sf_mex_unlock_call( int nlhs, mxArray * plhs[], int nrhs, const
+ mxArray * prhs[] )
+{
+ char commandName[20];
+ if (nrhs<1 || !mxIsChar(prhs[0]) )
+ return 0;
+
+ /* Possible call to get the checksum */
+ mxGetString(prhs[0], commandName,sizeof(commandName)/sizeof(char));
+ commandName[(sizeof(commandName)/sizeof(char)-1)] = '\0';
+ if (strcmp(commandName,"sf_mex_unlock"))
+ return 0;
+ while (mexIsLocked()) {
+ mexUnlock();
+ }
+
+ return(1);
+}
+
+extern unsigned int sf_debug_api( int nlhs, mxArray * plhs[], int nrhs, const
+ mxArray * prhs[] );
+static unsigned int ProcessMexSfunctionCmdLineCall(int nlhs, mxArray * plhs[],
+ int nrhs, const mxArray * prhs[])
+{
+ if (sf_debug_api(nlhs,plhs,nrhs,prhs))
+ return 1;
+ if (sf_process_check_sum_call(nlhs,plhs,nrhs,prhs))
+ return 1;
+ if (sf_mex_unlock_call(nlhs,plhs,nrhs,prhs))
+ return 1;
+ if (sf_process_autoinheritance_call(nlhs,plhs,nrhs,prhs))
+ return 1;
+ if (sf_process_get_eml_resolved_functions_info_call(nlhs,plhs,nrhs,prhs))
+ return 1;
+ mexErrMsgTxt("Unsuccessful command.");
+ return 0;
+}
+
+static unsigned int sfMachineGlobalTerminatorCallable = 0;
+static unsigned int sfMachineGlobalInitializerCallable = 1;
+unsigned int sf_machine_global_initializer_called(void)
+{
+ return(!sfMachineGlobalInitializerCallable);
+}
+
+extern unsigned int sf_P5_method_dispatcher(SimStruct *S, unsigned int
+ chartFileNumber, const char* specsCksum, int_T method, void *data);
+unsigned int sf_machine_global_method_dispatcher(SimStruct *simstructPtr, const
+ char *machineName, unsigned int chartFileNumber, const char* specsCksum, int_T
+ method, void *data)
+{
+ if (!strcmp(machineName,"P5")) {
+ return(sf_P5_method_dispatcher(simstructPtr,chartFileNumber,specsCksum,
+ method,data));
+ }
+
+ return 0;
+}
+
+extern void P5_terminator(void);
+void sf_machine_global_terminator(void)
+{
+ if (sfMachineGlobalTerminatorCallable) {
+ sfMachineGlobalTerminatorCallable = 0;
+ sfMachineGlobalInitializerCallable = 1;
+ P5_terminator();
+ sf_debug_terminate();
+ }
+
+ return;
+}
+
+extern void P5_initializer(void);
+extern void P5_register_exported_symbols(SimStruct* S);
+extern void P5_debug_initialize(void);
+void sf_register_machine_exported_symbols(SimStruct* S)
+{
+ P5_register_exported_symbols(S);
+}
+
+bool callCustomFcn(char initFlag)
+{
+ return false;
+}
+
+void sf_machine_global_initializer(SimStruct* S)
+{
+ bool simModeIsRTWGen = sim_mode_is_rtw_gen(S);
+ if (sfMachineGlobalInitializerCallable) {
+ sfMachineGlobalInitializerCallable = 0;
+ sfMachineGlobalTerminatorCallable = 1;
+ if (simModeIsRTWGen) {
+ sf_register_machine_exported_symbols(S);
+ }
+
+ if (!simModeIsRTWGen) {
+ P5_debug_initialize();
+ }
+
+ P5_initializer();
+ }
+
+ return;
+}
+
+#define PROCESS_MEX_SFUNCTION_EVERY_CALL
+
+unsigned int ProcessMexSfunctionEveryCall(int_T nlhs, mxArray *plhs[], int_T
+ nrhs, const mxArray *prhs[]);
+
+#include "simulink.c" /* MEX-file interface mechanism */
+
+static void sf_machine_load_sfunction_ptrs(SimStruct *S)
+{
+ ssSetmdlInitializeSampleTimes(S,__mdlInitializeSampleTimes);
+ ssSetmdlInitializeConditions(S,__mdlInitializeConditions);
+ ssSetmdlOutputs(S,__mdlOutputs);
+ ssSetmdlTerminate(S,__mdlTerminate);
+ ssSetmdlRTW(S,__mdlRTW);
+ ssSetmdlSetWorkWidths(S,__mdlSetWorkWidths);
+
+#if defined(MDL_HASSIMULATIONCONTEXTIO)
+
+ ssSetmdlSimulationContextIO(S,__mdlSimulationContextIO);
+
+#endif
+
+#if defined(MDL_START)
+
+ ssSetmdlStart(S,__mdlStart);
+
+#endif
+
+#if defined(RTW_GENERATED_ENABLE)
+
+ ssSetRTWGeneratedEnable(S,__mdlEnable);
+
+#endif
+
+#if defined(RTW_GENERATED_DISABLE)
+
+ ssSetRTWGeneratedDisable(S,__mdlDisable);
+
+#endif
+
+#if defined(MDL_ENABLE)
+
+ ssSetmdlEnable(S,__mdlEnable);
+
+#endif
+
+#if defined(MDL_DISABLE)
+
+ ssSetmdlDisable(S,__mdlDisable);
+
+#endif
+
+#if defined(MDL_SIM_STATUS_CHANGE)
+
+ ssSetmdlSimStatusChange(S,__mdlSimStatusChange);
+
+#endif
+
+#if defined(MDL_EXT_MODE_EXEC)
+
+ ssSetmdlExtModeExec(S,__mdlExtModeExec);
+
+#endif
+
+#if defined(MDL_UPDATE)
+
+ ssSetmdlUpdate(S,__mdlUpdate);
+
+#endif
+
+#if defined(MDL_PROCESS_PARAMETERS)
+
+ ssSetmdlProcessParameters(S,__mdlProcessParameters);
+
+#endif
+
+#if defined(MDL_ZERO_CROSSINGS)
+
+ ssSetmdlZeroCrossings(S,__mdlZeroCrossings);
+
+#endif
+
+#if defined(MDL_DERIVATIVES)
+
+ ssSetmdlDerivatives(S,__mdlDerivatives);
+
+#endif
+
+}
+
+unsigned int ProcessMexSfunctionEveryCall(int_T nlhs, mxArray *plhs[], int_T
+ nrhs, const mxArray *prhs[])
+{
+ if (nlhs < 0) {
+ SimStruct *S = (SimStruct *)plhs[_LHS_SS];
+ int_T flag = (int_T)(*(real_T*)mxGetPr(prhs[_RHS_FLAG]));
+ if (flag == SS_CALL_MDL_SET_WORK_WIDTHS) {
+ sf_machine_load_sfunction_ptrs(S);
+ }
+ }
+
+ return 0;
+}
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun_registry.o b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun_registry.o
new file mode 100644
index 00000000..fba32db0
Binary files /dev/null and b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/P5_sfun_registry.o differ
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c1_P5.c b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c1_P5.c
new file mode 100644
index 00000000..531d83c7
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c1_P5.c
@@ -0,0 +1,840 @@
+/* Include files */
+
+#include "blascompat32.h"
+#include "P5_sfun.h"
+#include "c1_P5.h"
+#include "mwmathutil.h"
+#define CHARTINSTANCE_CHARTNUMBER (chartInstance->chartNumber)
+#define CHARTINSTANCE_INSTANCENUMBER (chartInstance->instanceNumber)
+#include "P5_sfun_debug_macros.h"
+
+/* Type Definitions */
+
+/* Named Constants */
+#define CALL_EVENT (-1)
+
+/* Variable Declarations */
+
+/* Variable Definitions */
+static const char * c1_debug_family_names[5] = { "nargin", "nargout", "t", "x",
+ "yout" };
+
+/* Function Declarations */
+static void initialize_c1_P5(SFc1_P5InstanceStruct *chartInstance);
+static void initialize_params_c1_P5(SFc1_P5InstanceStruct *chartInstance);
+static void enable_c1_P5(SFc1_P5InstanceStruct *chartInstance);
+static void disable_c1_P5(SFc1_P5InstanceStruct *chartInstance);
+static void c1_update_debugger_state_c1_P5(SFc1_P5InstanceStruct *chartInstance);
+static const mxArray *get_sim_state_c1_P5(SFc1_P5InstanceStruct *chartInstance);
+static void set_sim_state_c1_P5(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_st);
+static void finalize_c1_P5(SFc1_P5InstanceStruct *chartInstance);
+static void sf_c1_P5(SFc1_P5InstanceStruct *chartInstance);
+static void initSimStructsc1_P5(SFc1_P5InstanceStruct *chartInstance);
+static void init_script_number_translation(uint32_T c1_machineNumber, uint32_T
+ c1_chartNumber);
+static const mxArray *c1_sf_marshallOut(void *chartInstanceVoid, void *c1_inData);
+static real_T c1_emlrt_marshallIn(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_yout, const char_T *c1_identifier);
+static real_T c1_b_emlrt_marshallIn(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_u, const emlrtMsgIdentifier *c1_parentId);
+static void c1_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c1_mxArrayInData, const char_T *c1_varName, void *c1_outData);
+static const mxArray *c1_b_sf_marshallOut(void *chartInstanceVoid, void
+ *c1_inData);
+static int32_T c1_c_emlrt_marshallIn(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_u, const emlrtMsgIdentifier *c1_parentId);
+static void c1_b_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c1_mxArrayInData, const char_T *c1_varName, void *c1_outData);
+static uint8_T c1_d_emlrt_marshallIn(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_b_is_active_c1_P5, const char_T *c1_identifier);
+static uint8_T c1_e_emlrt_marshallIn(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_u, const emlrtMsgIdentifier *c1_parentId);
+static void init_dsm_address_info(SFc1_P5InstanceStruct *chartInstance);
+
+/* Function Definitions */
+static void initialize_c1_P5(SFc1_P5InstanceStruct *chartInstance)
+{
+ chartInstance->c1_sfEvent = CALL_EVENT;
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+ chartInstance->c1_is_active_c1_P5 = 0U;
+}
+
+static void initialize_params_c1_P5(SFc1_P5InstanceStruct *chartInstance)
+{
+}
+
+static void enable_c1_P5(SFc1_P5InstanceStruct *chartInstance)
+{
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+}
+
+static void disable_c1_P5(SFc1_P5InstanceStruct *chartInstance)
+{
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+}
+
+static void c1_update_debugger_state_c1_P5(SFc1_P5InstanceStruct *chartInstance)
+{
+}
+
+static const mxArray *get_sim_state_c1_P5(SFc1_P5InstanceStruct *chartInstance)
+{
+ const mxArray *c1_st;
+ const mxArray *c1_y = NULL;
+ real_T c1_hoistedGlobal;
+ real_T c1_u;
+ const mxArray *c1_b_y = NULL;
+ uint8_T c1_b_hoistedGlobal;
+ uint8_T c1_b_u;
+ const mxArray *c1_c_y = NULL;
+ real_T *c1_yout;
+ c1_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ c1_st = NULL;
+ c1_st = NULL;
+ c1_y = NULL;
+ sf_mex_assign(&c1_y, sf_mex_createcellarray(2), FALSE);
+ c1_hoistedGlobal = *c1_yout;
+ c1_u = c1_hoistedGlobal;
+ c1_b_y = NULL;
+ sf_mex_assign(&c1_b_y, sf_mex_create("y", &c1_u, 0, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_setcell(c1_y, 0, c1_b_y);
+ c1_b_hoistedGlobal = chartInstance->c1_is_active_c1_P5;
+ c1_b_u = c1_b_hoistedGlobal;
+ c1_c_y = NULL;
+ sf_mex_assign(&c1_c_y, sf_mex_create("y", &c1_b_u, 3, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_setcell(c1_y, 1, c1_c_y);
+ sf_mex_assign(&c1_st, c1_y, FALSE);
+ return c1_st;
+}
+
+static void set_sim_state_c1_P5(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_st)
+{
+ const mxArray *c1_u;
+ real_T *c1_yout;
+ c1_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ chartInstance->c1_doneDoubleBufferReInit = TRUE;
+ c1_u = sf_mex_dup(c1_st);
+ *c1_yout = c1_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c1_u,
+ 0)), "yout");
+ chartInstance->c1_is_active_c1_P5 = c1_d_emlrt_marshallIn(chartInstance,
+ sf_mex_dup(sf_mex_getcell(c1_u, 1)), "is_active_c1_P5");
+ sf_mex_destroy(&c1_u);
+ c1_update_debugger_state_c1_P5(chartInstance);
+ sf_mex_destroy(&c1_st);
+}
+
+static void finalize_c1_P5(SFc1_P5InstanceStruct *chartInstance)
+{
+}
+
+static void sf_c1_P5(SFc1_P5InstanceStruct *chartInstance)
+{
+ real_T c1_hoistedGlobal;
+ real_T c1_b_hoistedGlobal;
+ real_T c1_t;
+ real_T c1_x;
+ uint32_T c1_debug_family_var_map[5];
+ real_T c1_nargin = 2.0;
+ real_T c1_nargout = 1.0;
+ real_T c1_yout;
+ real_T c1_b_x;
+ real_T c1_c_x;
+ real_T c1_b;
+ real_T c1_y;
+ real_T *c1_b_t;
+ real_T *c1_b_yout;
+ real_T *c1_d_x;
+ c1_d_x = (real_T *)ssGetInputPortSignal(chartInstance->S, 1);
+ c1_b_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ c1_b_t = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+ _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
+ _SFD_DATA_RANGE_CHECK(*c1_b_t, 0U);
+ _SFD_DATA_RANGE_CHECK(*c1_b_yout, 1U);
+ _SFD_DATA_RANGE_CHECK(*c1_d_x, 2U);
+ chartInstance->c1_sfEvent = CALL_EVENT;
+ _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
+ c1_hoistedGlobal = *c1_b_t;
+ c1_b_hoistedGlobal = *c1_d_x;
+ c1_t = c1_hoistedGlobal;
+ c1_x = c1_b_hoistedGlobal;
+ sf_debug_symbol_scope_push_eml(0U, 5U, 5U, c1_debug_family_names,
+ c1_debug_family_var_map);
+ sf_debug_symbol_scope_add_eml_importable(&c1_nargin, 0U, c1_sf_marshallOut,
+ c1_sf_marshallIn);
+ sf_debug_symbol_scope_add_eml_importable(&c1_nargout, 1U, c1_sf_marshallOut,
+ c1_sf_marshallIn);
+ sf_debug_symbol_scope_add_eml(&c1_t, 2U, c1_sf_marshallOut);
+ sf_debug_symbol_scope_add_eml(&c1_x, 3U, c1_sf_marshallOut);
+ sf_debug_symbol_scope_add_eml_importable(&c1_yout, 4U, c1_sf_marshallOut,
+ c1_sf_marshallIn);
+ CV_EML_FCN(0, 0);
+ _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, 3);
+ c1_b_x = c1_t;
+ c1_c_x = c1_b_x;
+ c1_c_x = muDoubleScalarCos(c1_c_x);
+ c1_b = c1_c_x;
+ c1_y = 5.0 * c1_b;
+ c1_yout = c1_x - c1_y;
+ _SFD_EML_CALL(0U, chartInstance->c1_sfEvent, -3);
+ sf_debug_symbol_scope_pop();
+ *c1_b_yout = c1_yout;
+ _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 0U, chartInstance->c1_sfEvent);
+ sf_debug_check_for_state_inconsistency(_P5MachineNumber_,
+ chartInstance->chartNumber, chartInstance->instanceNumber);
+}
+
+static void initSimStructsc1_P5(SFc1_P5InstanceStruct *chartInstance)
+{
+}
+
+static void init_script_number_translation(uint32_T c1_machineNumber, uint32_T
+ c1_chartNumber)
+{
+}
+
+static const mxArray *c1_sf_marshallOut(void *chartInstanceVoid, void *c1_inData)
+{
+ const mxArray *c1_mxArrayOutData = NULL;
+ real_T c1_u;
+ const mxArray *c1_y = NULL;
+ SFc1_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc1_P5InstanceStruct *)chartInstanceVoid;
+ c1_mxArrayOutData = NULL;
+ c1_u = *(real_T *)c1_inData;
+ c1_y = NULL;
+ sf_mex_assign(&c1_y, sf_mex_create("y", &c1_u, 0, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_assign(&c1_mxArrayOutData, c1_y, FALSE);
+ return c1_mxArrayOutData;
+}
+
+static real_T c1_emlrt_marshallIn(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_yout, const char_T *c1_identifier)
+{
+ real_T c1_y;
+ emlrtMsgIdentifier c1_thisId;
+ c1_thisId.fIdentifier = c1_identifier;
+ c1_thisId.fParent = NULL;
+ c1_y = c1_b_emlrt_marshallIn(chartInstance, sf_mex_dup(c1_yout), &c1_thisId);
+ sf_mex_destroy(&c1_yout);
+ return c1_y;
+}
+
+static real_T c1_b_emlrt_marshallIn(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_u, const emlrtMsgIdentifier *c1_parentId)
+{
+ real_T c1_y;
+ real_T c1_d0;
+ sf_mex_import(c1_parentId, sf_mex_dup(c1_u), &c1_d0, 1, 0, 0U, 0, 0U, 0);
+ c1_y = c1_d0;
+ sf_mex_destroy(&c1_u);
+ return c1_y;
+}
+
+static void c1_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c1_mxArrayInData, const char_T *c1_varName, void *c1_outData)
+{
+ const mxArray *c1_yout;
+ const char_T *c1_identifier;
+ emlrtMsgIdentifier c1_thisId;
+ real_T c1_y;
+ SFc1_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc1_P5InstanceStruct *)chartInstanceVoid;
+ c1_yout = sf_mex_dup(c1_mxArrayInData);
+ c1_identifier = c1_varName;
+ c1_thisId.fIdentifier = c1_identifier;
+ c1_thisId.fParent = NULL;
+ c1_y = c1_b_emlrt_marshallIn(chartInstance, sf_mex_dup(c1_yout), &c1_thisId);
+ sf_mex_destroy(&c1_yout);
+ *(real_T *)c1_outData = c1_y;
+ sf_mex_destroy(&c1_mxArrayInData);
+}
+
+const mxArray *sf_c1_P5_get_eml_resolved_functions_info(void)
+{
+ const mxArray *c1_nameCaptureInfo;
+ c1_ResolvedFunctionInfo c1_info[3];
+ c1_ResolvedFunctionInfo (*c1_b_info)[3];
+ const mxArray *c1_m0 = NULL;
+ int32_T c1_i0;
+ c1_ResolvedFunctionInfo *c1_r0;
+ c1_nameCaptureInfo = NULL;
+ c1_nameCaptureInfo = NULL;
+ c1_b_info = (c1_ResolvedFunctionInfo (*)[3])c1_info;
+ (*c1_b_info)[0].context = "";
+ (*c1_b_info)[0].name = "cos";
+ (*c1_b_info)[0].dominantType = "double";
+ (*c1_b_info)[0].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/cos.m";
+ (*c1_b_info)[0].fileTimeLo = 1286818706U;
+ (*c1_b_info)[0].fileTimeHi = 0U;
+ (*c1_b_info)[0].mFileTimeLo = 0U;
+ (*c1_b_info)[0].mFileTimeHi = 0U;
+ (*c1_b_info)[1].context =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/cos.m";
+ (*c1_b_info)[1].name = "eml_scalar_cos";
+ (*c1_b_info)[1].dominantType = "double";
+ (*c1_b_info)[1].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/eml_scalar_cos.m";
+ (*c1_b_info)[1].fileTimeLo = 1286818722U;
+ (*c1_b_info)[1].fileTimeHi = 0U;
+ (*c1_b_info)[1].mFileTimeLo = 0U;
+ (*c1_b_info)[1].mFileTimeHi = 0U;
+ (*c1_b_info)[2].context = "";
+ (*c1_b_info)[2].name = "mtimes";
+ (*c1_b_info)[2].dominantType = "double";
+ (*c1_b_info)[2].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/mtimes.m";
+ (*c1_b_info)[2].fileTimeLo = 1289519692U;
+ (*c1_b_info)[2].fileTimeHi = 0U;
+ (*c1_b_info)[2].mFileTimeLo = 0U;
+ (*c1_b_info)[2].mFileTimeHi = 0U;
+ sf_mex_assign(&c1_m0, sf_mex_createstruct("nameCaptureInfo", 1, 3), FALSE);
+ for (c1_i0 = 0; c1_i0 < 3; c1_i0++) {
+ c1_r0 = &c1_info[c1_i0];
+ sf_mex_addfield(c1_m0, sf_mex_create("nameCaptureInfo", c1_r0->context, 15,
+ 0U, 0U, 0U, 2, 1, strlen(c1_r0->context)), "context", "nameCaptureInfo",
+ c1_i0);
+ sf_mex_addfield(c1_m0, sf_mex_create("nameCaptureInfo", c1_r0->name, 15, 0U,
+ 0U, 0U, 2, 1, strlen(c1_r0->name)), "name", "nameCaptureInfo", c1_i0);
+ sf_mex_addfield(c1_m0, sf_mex_create("nameCaptureInfo", c1_r0->dominantType,
+ 15, 0U, 0U, 0U, 2, 1, strlen(c1_r0->dominantType)), "dominantType",
+ "nameCaptureInfo", c1_i0);
+ sf_mex_addfield(c1_m0, sf_mex_create("nameCaptureInfo", c1_r0->resolved, 15,
+ 0U, 0U, 0U, 2, 1, strlen(c1_r0->resolved)), "resolved", "nameCaptureInfo",
+ c1_i0);
+ sf_mex_addfield(c1_m0, sf_mex_create("nameCaptureInfo", &c1_r0->fileTimeLo,
+ 7, 0U, 0U, 0U, 0), "fileTimeLo", "nameCaptureInfo", c1_i0);
+ sf_mex_addfield(c1_m0, sf_mex_create("nameCaptureInfo", &c1_r0->fileTimeHi,
+ 7, 0U, 0U, 0U, 0), "fileTimeHi", "nameCaptureInfo", c1_i0);
+ sf_mex_addfield(c1_m0, sf_mex_create("nameCaptureInfo", &c1_r0->mFileTimeLo,
+ 7, 0U, 0U, 0U, 0), "mFileTimeLo", "nameCaptureInfo", c1_i0);
+ sf_mex_addfield(c1_m0, sf_mex_create("nameCaptureInfo", &c1_r0->mFileTimeHi,
+ 7, 0U, 0U, 0U, 0), "mFileTimeHi", "nameCaptureInfo", c1_i0);
+ }
+
+ sf_mex_assign(&c1_nameCaptureInfo, c1_m0, FALSE);
+ sf_mex_emlrtNameCapturePostProcessR2012a(&c1_nameCaptureInfo);
+ return c1_nameCaptureInfo;
+}
+
+static const mxArray *c1_b_sf_marshallOut(void *chartInstanceVoid, void
+ *c1_inData)
+{
+ const mxArray *c1_mxArrayOutData = NULL;
+ int32_T c1_u;
+ const mxArray *c1_y = NULL;
+ SFc1_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc1_P5InstanceStruct *)chartInstanceVoid;
+ c1_mxArrayOutData = NULL;
+ c1_u = *(int32_T *)c1_inData;
+ c1_y = NULL;
+ sf_mex_assign(&c1_y, sf_mex_create("y", &c1_u, 6, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_assign(&c1_mxArrayOutData, c1_y, FALSE);
+ return c1_mxArrayOutData;
+}
+
+static int32_T c1_c_emlrt_marshallIn(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_u, const emlrtMsgIdentifier *c1_parentId)
+{
+ int32_T c1_y;
+ int32_T c1_i1;
+ sf_mex_import(c1_parentId, sf_mex_dup(c1_u), &c1_i1, 1, 6, 0U, 0, 0U, 0);
+ c1_y = c1_i1;
+ sf_mex_destroy(&c1_u);
+ return c1_y;
+}
+
+static void c1_b_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c1_mxArrayInData, const char_T *c1_varName, void *c1_outData)
+{
+ const mxArray *c1_b_sfEvent;
+ const char_T *c1_identifier;
+ emlrtMsgIdentifier c1_thisId;
+ int32_T c1_y;
+ SFc1_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc1_P5InstanceStruct *)chartInstanceVoid;
+ c1_b_sfEvent = sf_mex_dup(c1_mxArrayInData);
+ c1_identifier = c1_varName;
+ c1_thisId.fIdentifier = c1_identifier;
+ c1_thisId.fParent = NULL;
+ c1_y = c1_c_emlrt_marshallIn(chartInstance, sf_mex_dup(c1_b_sfEvent),
+ &c1_thisId);
+ sf_mex_destroy(&c1_b_sfEvent);
+ *(int32_T *)c1_outData = c1_y;
+ sf_mex_destroy(&c1_mxArrayInData);
+}
+
+static uint8_T c1_d_emlrt_marshallIn(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_b_is_active_c1_P5, const char_T *c1_identifier)
+{
+ uint8_T c1_y;
+ emlrtMsgIdentifier c1_thisId;
+ c1_thisId.fIdentifier = c1_identifier;
+ c1_thisId.fParent = NULL;
+ c1_y = c1_e_emlrt_marshallIn(chartInstance, sf_mex_dup(c1_b_is_active_c1_P5),
+ &c1_thisId);
+ sf_mex_destroy(&c1_b_is_active_c1_P5);
+ return c1_y;
+}
+
+static uint8_T c1_e_emlrt_marshallIn(SFc1_P5InstanceStruct *chartInstance, const
+ mxArray *c1_u, const emlrtMsgIdentifier *c1_parentId)
+{
+ uint8_T c1_y;
+ uint8_T c1_u0;
+ sf_mex_import(c1_parentId, sf_mex_dup(c1_u), &c1_u0, 1, 3, 0U, 0, 0U, 0);
+ c1_y = c1_u0;
+ sf_mex_destroy(&c1_u);
+ return c1_y;
+}
+
+static void init_dsm_address_info(SFc1_P5InstanceStruct *chartInstance)
+{
+}
+
+/* SFunction Glue Code */
+void sf_c1_P5_get_check_sum(mxArray *plhs[])
+{
+ ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(3485560478U);
+ ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(1937190192U);
+ ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(2844616663U);
+ ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(4253939619U);
+}
+
+mxArray *sf_c1_P5_get_autoinheritance_info(void)
+{
+ const char *autoinheritanceFields[] = { "checksum", "inputs", "parameters",
+ "outputs", "locals" };
+
+ mxArray *mxAutoinheritanceInfo = mxCreateStructMatrix(1,1,5,
+ autoinheritanceFields);
+
+ {
+ mxArray *mxChecksum = mxCreateString("T1ccuYYHxoUvp3qes1AHgC");
+ mxSetField(mxAutoinheritanceInfo,0,"checksum",mxChecksum);
+ }
+
+ {
+ const char *dataFields[] = { "size", "type", "complexity" };
+
+ mxArray *mxData = mxCreateStructMatrix(1,2,3,dataFields);
+
+ {
+ mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
+ double *pr = mxGetPr(mxSize);
+ pr[0] = (double)(1);
+ pr[1] = (double)(1);
+ mxSetField(mxData,0,"size",mxSize);
+ }
+
+ {
+ const char *typeFields[] = { "base", "fixpt" };
+
+ mxArray *mxType = mxCreateStructMatrix(1,1,2,typeFields);
+ mxSetField(mxType,0,"base",mxCreateDoubleScalar(10));
+ mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL));
+ mxSetField(mxData,0,"type",mxType);
+ }
+
+ mxSetField(mxData,0,"complexity",mxCreateDoubleScalar(0));
+
+ {
+ mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
+ double *pr = mxGetPr(mxSize);
+ pr[0] = (double)(1);
+ pr[1] = (double)(1);
+ mxSetField(mxData,1,"size",mxSize);
+ }
+
+ {
+ const char *typeFields[] = { "base", "fixpt" };
+
+ mxArray *mxType = mxCreateStructMatrix(1,1,2,typeFields);
+ mxSetField(mxType,0,"base",mxCreateDoubleScalar(10));
+ mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL));
+ mxSetField(mxData,1,"type",mxType);
+ }
+
+ mxSetField(mxData,1,"complexity",mxCreateDoubleScalar(0));
+ mxSetField(mxAutoinheritanceInfo,0,"inputs",mxData);
+ }
+
+ {
+ mxSetField(mxAutoinheritanceInfo,0,"parameters",mxCreateDoubleMatrix(0,0,
+ mxREAL));
+ }
+
+ {
+ const char *dataFields[] = { "size", "type", "complexity" };
+
+ mxArray *mxData = mxCreateStructMatrix(1,1,3,dataFields);
+
+ {
+ mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
+ double *pr = mxGetPr(mxSize);
+ pr[0] = (double)(1);
+ pr[1] = (double)(1);
+ mxSetField(mxData,0,"size",mxSize);
+ }
+
+ {
+ const char *typeFields[] = { "base", "fixpt" };
+
+ mxArray *mxType = mxCreateStructMatrix(1,1,2,typeFields);
+ mxSetField(mxType,0,"base",mxCreateDoubleScalar(10));
+ mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL));
+ mxSetField(mxData,0,"type",mxType);
+ }
+
+ mxSetField(mxData,0,"complexity",mxCreateDoubleScalar(0));
+ mxSetField(mxAutoinheritanceInfo,0,"outputs",mxData);
+ }
+
+ {
+ mxSetField(mxAutoinheritanceInfo,0,"locals",mxCreateDoubleMatrix(0,0,mxREAL));
+ }
+
+ return(mxAutoinheritanceInfo);
+}
+
+static const mxArray *sf_get_sim_state_info_c1_P5(void)
+{
+ const char *infoFields[] = { "chartChecksum", "varInfo" };
+
+ mxArray *mxInfo = mxCreateStructMatrix(1, 1, 2, infoFields);
+ const char *infoEncStr[] = {
+ "100 S1x2'type','srcId','name','auxInfo'{{M[1],M[5],T\"yout\",},{M[8],M[0],T\"is_active_c1_P5\",}}"
+ };
+
+ mxArray *mxVarInfo = sf_mex_decode_encoded_mx_struct_array(infoEncStr, 2, 10);
+ mxArray *mxChecksum = mxCreateDoubleMatrix(1, 4, mxREAL);
+ sf_c1_P5_get_check_sum(&mxChecksum);
+ mxSetField(mxInfo, 0, infoFields[0], mxChecksum);
+ mxSetField(mxInfo, 0, infoFields[1], mxVarInfo);
+ return mxInfo;
+}
+
+static void chart_debug_initialization(SimStruct *S, unsigned int
+ fullDebuggerInitialization)
+{
+ if (!sim_mode_is_rtw_gen(S)) {
+ SFc1_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc1_P5InstanceStruct *) ((ChartInfoStruct *)(ssGetUserData
+ (S)))->chartInstance;
+ if (ssIsFirstInitCond(S) && fullDebuggerInitialization==1) {
+ /* do this only if simulation is starting */
+ {
+ unsigned int chartAlreadyPresent;
+ chartAlreadyPresent = sf_debug_initialize_chart(_P5MachineNumber_,
+ 1,
+ 1,
+ 1,
+ 3,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ &(chartInstance->chartNumber),
+ &(chartInstance->instanceNumber),
+ ssGetPath(S),
+ (void *)S);
+ if (chartAlreadyPresent==0) {
+ /* this is the first instance */
+ init_script_number_translation(_P5MachineNumber_,
+ chartInstance->chartNumber);
+ sf_debug_set_chart_disable_implicit_casting(_P5MachineNumber_,
+ chartInstance->chartNumber,1);
+ sf_debug_set_chart_event_thresholds(_P5MachineNumber_,
+ chartInstance->chartNumber,
+ 0,
+ 0,
+ 0);
+ _SFD_SET_DATA_PROPS(0,1,1,0,"t");
+ _SFD_SET_DATA_PROPS(1,2,0,1,"yout");
+ _SFD_SET_DATA_PROPS(2,1,1,0,"x");
+ _SFD_STATE_INFO(0,0,2);
+ _SFD_CH_SUBSTATE_COUNT(0);
+ _SFD_CH_SUBSTATE_DECOMP(0);
+ }
+
+ _SFD_CV_INIT_CHART(0,0,0,0);
+
+ {
+ _SFD_CV_INIT_STATE(0,0,0,0,0,0,NULL,NULL);
+ }
+
+ _SFD_CV_INIT_TRANS(0,0,NULL,NULL,0,NULL);
+
+ /* Initialization of MATLAB Function Model Coverage */
+ _SFD_CV_INIT_EML(0,1,1,0,0,0,0,0,0,0);
+ _SFD_CV_INIT_EML_FCN(0,0,"eML_blk_kernel",0,-1,56);
+ _SFD_TRANS_COV_WTS(0,0,0,1,0);
+ if (chartAlreadyPresent==0) {
+ _SFD_TRANS_COV_MAPS(0,
+ 0,NULL,NULL,
+ 0,NULL,NULL,
+ 1,NULL,NULL,
+ 0,NULL,NULL);
+ }
+
+ _SFD_SET_DATA_COMPILED_PROPS(0,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0,
+ (MexFcnForType)c1_sf_marshallOut,(MexInFcnForType)NULL);
+ _SFD_SET_DATA_COMPILED_PROPS(1,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0,
+ (MexFcnForType)c1_sf_marshallOut,(MexInFcnForType)c1_sf_marshallIn);
+ _SFD_SET_DATA_COMPILED_PROPS(2,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0,
+ (MexFcnForType)c1_sf_marshallOut,(MexInFcnForType)NULL);
+
+ {
+ real_T *c1_t;
+ real_T *c1_yout;
+ real_T *c1_x;
+ c1_x = (real_T *)ssGetInputPortSignal(chartInstance->S, 1);
+ c1_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ c1_t = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
+ _SFD_SET_DATA_VALUE_PTR(0U, c1_t);
+ _SFD_SET_DATA_VALUE_PTR(1U, c1_yout);
+ _SFD_SET_DATA_VALUE_PTR(2U, c1_x);
+ }
+ }
+ } else {
+ sf_debug_reset_current_state_configuration(_P5MachineNumber_,
+ chartInstance->chartNumber,chartInstance->instanceNumber);
+ }
+ }
+}
+
+static const char* sf_get_instance_specialization()
+{
+ return "cMg4GJAMQ9ltkvk2Z8cpJB";
+}
+
+static void sf_opaque_initialize_c1_P5(void *chartInstanceVar)
+{
+ chart_debug_initialization(((SFc1_P5InstanceStruct*) chartInstanceVar)->S,0);
+ initialize_params_c1_P5((SFc1_P5InstanceStruct*) chartInstanceVar);
+ initialize_c1_P5((SFc1_P5InstanceStruct*) chartInstanceVar);
+}
+
+static void sf_opaque_enable_c1_P5(void *chartInstanceVar)
+{
+ enable_c1_P5((SFc1_P5InstanceStruct*) chartInstanceVar);
+}
+
+static void sf_opaque_disable_c1_P5(void *chartInstanceVar)
+{
+ disable_c1_P5((SFc1_P5InstanceStruct*) chartInstanceVar);
+}
+
+static void sf_opaque_gateway_c1_P5(void *chartInstanceVar)
+{
+ sf_c1_P5((SFc1_P5InstanceStruct*) chartInstanceVar);
+}
+
+extern const mxArray* sf_internal_get_sim_state_c1_P5(SimStruct* S)
+{
+ ChartInfoStruct *chartInfo = (ChartInfoStruct*) ssGetUserData(S);
+ mxArray *plhs[1] = { NULL };
+
+ mxArray *prhs[4];
+ int mxError = 0;
+ prhs[0] = mxCreateString("chart_simctx_raw2high");
+ prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
+ prhs[2] = (mxArray*) get_sim_state_c1_P5((SFc1_P5InstanceStruct*)
+ chartInfo->chartInstance); /* raw sim ctx */
+ prhs[3] = (mxArray*) sf_get_sim_state_info_c1_P5();/* state var info */
+ mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
+ mxDestroyArray(prhs[0]);
+ mxDestroyArray(prhs[1]);
+ mxDestroyArray(prhs[2]);
+ mxDestroyArray(prhs[3]);
+ if (mxError || plhs[0] == NULL) {
+ sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_raw2high'.\n");
+ }
+
+ return plhs[0];
+}
+
+extern void sf_internal_set_sim_state_c1_P5(SimStruct* S, const mxArray *st)
+{
+ ChartInfoStruct *chartInfo = (ChartInfoStruct*) ssGetUserData(S);
+ mxArray *plhs[1] = { NULL };
+
+ mxArray *prhs[4];
+ int mxError = 0;
+ prhs[0] = mxCreateString("chart_simctx_high2raw");
+ prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
+ prhs[2] = mxDuplicateArray(st); /* high level simctx */
+ prhs[3] = (mxArray*) sf_get_sim_state_info_c1_P5();/* state var info */
+ mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
+ mxDestroyArray(prhs[0]);
+ mxDestroyArray(prhs[1]);
+ mxDestroyArray(prhs[2]);
+ mxDestroyArray(prhs[3]);
+ if (mxError || plhs[0] == NULL) {
+ sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_high2raw'.\n");
+ }
+
+ set_sim_state_c1_P5((SFc1_P5InstanceStruct*)chartInfo->chartInstance,
+ mxDuplicateArray(plhs[0]));
+ mxDestroyArray(plhs[0]);
+}
+
+static const mxArray* sf_opaque_get_sim_state_c1_P5(SimStruct* S)
+{
+ return sf_internal_get_sim_state_c1_P5(S);
+}
+
+static void sf_opaque_set_sim_state_c1_P5(SimStruct* S, const mxArray *st)
+{
+ sf_internal_set_sim_state_c1_P5(S, st);
+}
+
+static void sf_opaque_terminate_c1_P5(void *chartInstanceVar)
+{
+ if (chartInstanceVar!=NULL) {
+ SimStruct *S = ((SFc1_P5InstanceStruct*) chartInstanceVar)->S;
+ if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) {
+ sf_clear_rtw_identifier(S);
+ }
+
+ finalize_c1_P5((SFc1_P5InstanceStruct*) chartInstanceVar);
+ free((void *)chartInstanceVar);
+ ssSetUserData(S,NULL);
+ }
+
+ unload_P5_optimization_info();
+}
+
+static void sf_opaque_init_subchart_simstructs(void *chartInstanceVar)
+{
+ initSimStructsc1_P5((SFc1_P5InstanceStruct*) chartInstanceVar);
+}
+
+extern unsigned int sf_machine_global_initializer_called(void);
+static void mdlProcessParameters_c1_P5(SimStruct *S)
+{
+ int i;
+ for (i=0;ichartInstance));
+ }
+}
+
+static void mdlSetWorkWidths_c1_P5(SimStruct *S)
+{
+ if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) {
+ mxArray *infoStruct = load_P5_optimization_info();
+ int_T chartIsInlinable =
+ (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct,
+ 1);
+ ssSetStateflowIsInlinable(S,chartIsInlinable);
+ ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(),
+ infoStruct,1,"RTWCG"));
+ ssSetEnableFcnIsTrivial(S,1);
+ ssSetDisableFcnIsTrivial(S,1);
+ ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S,
+ sf_get_instance_specialization(),infoStruct,1,
+ "gatewayCannotBeInlinedMultipleTimes"));
+ if (chartIsInlinable) {
+ ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL);
+ ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL);
+ sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(),
+ infoStruct,1,2);
+ sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(),
+ infoStruct,1,1);
+ }
+
+ sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,1);
+ ssSetHasSubFunctions(S,!(chartIsInlinable));
+ } else {
+ }
+
+ ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE);
+ ssSetChecksum0(S,(402595691U));
+ ssSetChecksum1(S,(46929911U));
+ ssSetChecksum2(S,(1934607192U));
+ ssSetChecksum3(S,(255229378U));
+ ssSetmdlDerivatives(S, NULL);
+ ssSetExplicitFCSSCtrl(S,1);
+}
+
+static void mdlRTW_c1_P5(SimStruct *S)
+{
+ if (sim_mode_is_rtw_gen(S)) {
+ ssWriteRTWStrParam(S, "StateflowChartType", "Embedded MATLAB");
+ }
+}
+
+static void mdlStart_c1_P5(SimStruct *S)
+{
+ SFc1_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc1_P5InstanceStruct *)malloc(sizeof(SFc1_P5InstanceStruct));
+ memset(chartInstance, 0, sizeof(SFc1_P5InstanceStruct));
+ if (chartInstance==NULL) {
+ sf_mex_error_message("Could not allocate memory for chart instance.");
+ }
+
+ chartInstance->chartInfo.chartInstance = chartInstance;
+ chartInstance->chartInfo.isEMLChart = 1;
+ chartInstance->chartInfo.chartInitialized = 0;
+ chartInstance->chartInfo.sFunctionGateway = sf_opaque_gateway_c1_P5;
+ chartInstance->chartInfo.initializeChart = sf_opaque_initialize_c1_P5;
+ chartInstance->chartInfo.terminateChart = sf_opaque_terminate_c1_P5;
+ chartInstance->chartInfo.enableChart = sf_opaque_enable_c1_P5;
+ chartInstance->chartInfo.disableChart = sf_opaque_disable_c1_P5;
+ chartInstance->chartInfo.getSimState = sf_opaque_get_sim_state_c1_P5;
+ chartInstance->chartInfo.setSimState = sf_opaque_set_sim_state_c1_P5;
+ chartInstance->chartInfo.getSimStateInfo = sf_get_sim_state_info_c1_P5;
+ chartInstance->chartInfo.zeroCrossings = NULL;
+ chartInstance->chartInfo.outputs = NULL;
+ chartInstance->chartInfo.derivatives = NULL;
+ chartInstance->chartInfo.mdlRTW = mdlRTW_c1_P5;
+ chartInstance->chartInfo.mdlStart = mdlStart_c1_P5;
+ chartInstance->chartInfo.mdlSetWorkWidths = mdlSetWorkWidths_c1_P5;
+ chartInstance->chartInfo.extModeExec = NULL;
+ chartInstance->chartInfo.restoreLastMajorStepConfiguration = NULL;
+ chartInstance->chartInfo.restoreBeforeLastMajorStepConfiguration = NULL;
+ chartInstance->chartInfo.storeCurrentConfiguration = NULL;
+ chartInstance->S = S;
+ ssSetUserData(S,(void *)(&(chartInstance->chartInfo)));/* register the chart instance with simstruct */
+ init_dsm_address_info(chartInstance);
+ if (!sim_mode_is_rtw_gen(S)) {
+ }
+
+ sf_opaque_init_subchart_simstructs(chartInstance->chartInfo.chartInstance);
+ chart_debug_initialization(S,1);
+}
+
+void c1_P5_method_dispatcher(SimStruct *S, int_T method, void *data)
+{
+ switch (method) {
+ case SS_CALL_MDL_START:
+ mdlStart_c1_P5(S);
+ break;
+
+ case SS_CALL_MDL_SET_WORK_WIDTHS:
+ mdlSetWorkWidths_c1_P5(S);
+ break;
+
+ case SS_CALL_MDL_PROCESS_PARAMETERS:
+ mdlProcessParameters_c1_P5(S);
+ break;
+
+ default:
+ /* Unhandled method */
+ sf_mex_error_message("Stateflow Internal Error:\n"
+ "Error calling c1_P5_method_dispatcher.\n"
+ "Can't handle method %d.\n", method);
+ break;
+ }
+}
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c1_P5.h b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c1_P5.h
new file mode 100644
index 00000000..110484a4
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c1_P5.h
@@ -0,0 +1,45 @@
+#ifndef __c1_P5_h__
+#define __c1_P5_h__
+
+/* Include files */
+#include "sfc_sf.h"
+#include "sfc_mex.h"
+#include "rtwtypes.h"
+
+/* Type Definitions */
+typedef struct {
+ const char * context;
+ const char * name;
+ const char * dominantType;
+ const char * resolved;
+ uint32_T fileTimeLo;
+ uint32_T fileTimeHi;
+ uint32_T mFileTimeLo;
+ uint32_T mFileTimeHi;
+} c1_ResolvedFunctionInfo;
+
+typedef struct {
+ int32_T c1_sfEvent;
+ boolean_T c1_isStable;
+ boolean_T c1_doneDoubleBufferReInit;
+ uint8_T c1_is_active_c1_P5;
+ SimStruct *S;
+ ChartInfoStruct chartInfo;
+ uint32_T chartNumber;
+ uint32_T instanceNumber;
+} SFc1_P5InstanceStruct;
+
+/* Named Constants */
+
+/* Variable Declarations */
+
+/* Variable Definitions */
+
+/* Function Declarations */
+extern const mxArray *sf_c1_P5_get_eml_resolved_functions_info(void);
+
+/* Function Definitions */
+extern void sf_c1_P5_get_check_sum(mxArray *plhs[]);
+extern void c1_P5_method_dispatcher(SimStruct *S, int_T method, void *data);
+
+#endif
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c1_P5.o b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c1_P5.o
new file mode 100644
index 00000000..631b4b5c
Binary files /dev/null and b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c1_P5.o differ
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c2_P5.c b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c2_P5.c
new file mode 100644
index 00000000..79386f7f
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c2_P5.c
@@ -0,0 +1,840 @@
+/* Include files */
+
+#include "blascompat32.h"
+#include "P5_sfun.h"
+#include "c2_P5.h"
+#include "mwmathutil.h"
+#define CHARTINSTANCE_CHARTNUMBER (chartInstance->chartNumber)
+#define CHARTINSTANCE_INSTANCENUMBER (chartInstance->instanceNumber)
+#include "P5_sfun_debug_macros.h"
+
+/* Type Definitions */
+
+/* Named Constants */
+#define CALL_EVENT (-1)
+
+/* Variable Declarations */
+
+/* Variable Definitions */
+static const char * c2_debug_family_names[5] = { "nargin", "nargout", "t", "y",
+ "yout" };
+
+/* Function Declarations */
+static void initialize_c2_P5(SFc2_P5InstanceStruct *chartInstance);
+static void initialize_params_c2_P5(SFc2_P5InstanceStruct *chartInstance);
+static void enable_c2_P5(SFc2_P5InstanceStruct *chartInstance);
+static void disable_c2_P5(SFc2_P5InstanceStruct *chartInstance);
+static void c2_update_debugger_state_c2_P5(SFc2_P5InstanceStruct *chartInstance);
+static const mxArray *get_sim_state_c2_P5(SFc2_P5InstanceStruct *chartInstance);
+static void set_sim_state_c2_P5(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_st);
+static void finalize_c2_P5(SFc2_P5InstanceStruct *chartInstance);
+static void sf_c2_P5(SFc2_P5InstanceStruct *chartInstance);
+static void initSimStructsc2_P5(SFc2_P5InstanceStruct *chartInstance);
+static void init_script_number_translation(uint32_T c2_machineNumber, uint32_T
+ c2_chartNumber);
+static const mxArray *c2_sf_marshallOut(void *chartInstanceVoid, void *c2_inData);
+static real_T c2_emlrt_marshallIn(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_yout, const char_T *c2_identifier);
+static real_T c2_b_emlrt_marshallIn(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId);
+static void c2_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData);
+static const mxArray *c2_b_sf_marshallOut(void *chartInstanceVoid, void
+ *c2_inData);
+static int32_T c2_c_emlrt_marshallIn(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId);
+static void c2_b_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData);
+static uint8_T c2_d_emlrt_marshallIn(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_b_is_active_c2_P5, const char_T *c2_identifier);
+static uint8_T c2_e_emlrt_marshallIn(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId);
+static void init_dsm_address_info(SFc2_P5InstanceStruct *chartInstance);
+
+/* Function Definitions */
+static void initialize_c2_P5(SFc2_P5InstanceStruct *chartInstance)
+{
+ chartInstance->c2_sfEvent = CALL_EVENT;
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+ chartInstance->c2_is_active_c2_P5 = 0U;
+}
+
+static void initialize_params_c2_P5(SFc2_P5InstanceStruct *chartInstance)
+{
+}
+
+static void enable_c2_P5(SFc2_P5InstanceStruct *chartInstance)
+{
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+}
+
+static void disable_c2_P5(SFc2_P5InstanceStruct *chartInstance)
+{
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+}
+
+static void c2_update_debugger_state_c2_P5(SFc2_P5InstanceStruct *chartInstance)
+{
+}
+
+static const mxArray *get_sim_state_c2_P5(SFc2_P5InstanceStruct *chartInstance)
+{
+ const mxArray *c2_st;
+ const mxArray *c2_y = NULL;
+ real_T c2_hoistedGlobal;
+ real_T c2_u;
+ const mxArray *c2_b_y = NULL;
+ uint8_T c2_b_hoistedGlobal;
+ uint8_T c2_b_u;
+ const mxArray *c2_c_y = NULL;
+ real_T *c2_yout;
+ c2_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ c2_st = NULL;
+ c2_st = NULL;
+ c2_y = NULL;
+ sf_mex_assign(&c2_y, sf_mex_createcellarray(2), FALSE);
+ c2_hoistedGlobal = *c2_yout;
+ c2_u = c2_hoistedGlobal;
+ c2_b_y = NULL;
+ sf_mex_assign(&c2_b_y, sf_mex_create("y", &c2_u, 0, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_setcell(c2_y, 0, c2_b_y);
+ c2_b_hoistedGlobal = chartInstance->c2_is_active_c2_P5;
+ c2_b_u = c2_b_hoistedGlobal;
+ c2_c_y = NULL;
+ sf_mex_assign(&c2_c_y, sf_mex_create("y", &c2_b_u, 3, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_setcell(c2_y, 1, c2_c_y);
+ sf_mex_assign(&c2_st, c2_y, FALSE);
+ return c2_st;
+}
+
+static void set_sim_state_c2_P5(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_st)
+{
+ const mxArray *c2_u;
+ real_T *c2_yout;
+ c2_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ chartInstance->c2_doneDoubleBufferReInit = TRUE;
+ c2_u = sf_mex_dup(c2_st);
+ *c2_yout = c2_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c2_u,
+ 0)), "yout");
+ chartInstance->c2_is_active_c2_P5 = c2_d_emlrt_marshallIn(chartInstance,
+ sf_mex_dup(sf_mex_getcell(c2_u, 1)), "is_active_c2_P5");
+ sf_mex_destroy(&c2_u);
+ c2_update_debugger_state_c2_P5(chartInstance);
+ sf_mex_destroy(&c2_st);
+}
+
+static void finalize_c2_P5(SFc2_P5InstanceStruct *chartInstance)
+{
+}
+
+static void sf_c2_P5(SFc2_P5InstanceStruct *chartInstance)
+{
+ real_T c2_hoistedGlobal;
+ real_T c2_b_hoistedGlobal;
+ real_T c2_t;
+ real_T c2_y;
+ uint32_T c2_debug_family_var_map[5];
+ real_T c2_nargin = 2.0;
+ real_T c2_nargout = 1.0;
+ real_T c2_yout;
+ real_T c2_x;
+ real_T c2_b_x;
+ real_T c2_b;
+ real_T c2_b_y;
+ real_T *c2_b_t;
+ real_T *c2_c_y;
+ real_T *c2_b_yout;
+ c2_b_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ c2_c_y = (real_T *)ssGetInputPortSignal(chartInstance->S, 1);
+ c2_b_t = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+ _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 1U, chartInstance->c2_sfEvent);
+ _SFD_DATA_RANGE_CHECK(*c2_b_t, 0U);
+ _SFD_DATA_RANGE_CHECK(*c2_c_y, 1U);
+ _SFD_DATA_RANGE_CHECK(*c2_b_yout, 2U);
+ chartInstance->c2_sfEvent = CALL_EVENT;
+ _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 1U, chartInstance->c2_sfEvent);
+ c2_hoistedGlobal = *c2_b_t;
+ c2_b_hoistedGlobal = *c2_c_y;
+ c2_t = c2_hoistedGlobal;
+ c2_y = c2_b_hoistedGlobal;
+ sf_debug_symbol_scope_push_eml(0U, 5U, 5U, c2_debug_family_names,
+ c2_debug_family_var_map);
+ sf_debug_symbol_scope_add_eml_importable(&c2_nargin, 0U, c2_sf_marshallOut,
+ c2_sf_marshallIn);
+ sf_debug_symbol_scope_add_eml_importable(&c2_nargout, 1U, c2_sf_marshallOut,
+ c2_sf_marshallIn);
+ sf_debug_symbol_scope_add_eml(&c2_t, 2U, c2_sf_marshallOut);
+ sf_debug_symbol_scope_add_eml(&c2_y, 3U, c2_sf_marshallOut);
+ sf_debug_symbol_scope_add_eml_importable(&c2_yout, 4U, c2_sf_marshallOut,
+ c2_sf_marshallIn);
+ CV_EML_FCN(0, 0);
+ _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, 3);
+ c2_x = c2_t;
+ c2_b_x = c2_x;
+ c2_b_x = muDoubleScalarSin(c2_b_x);
+ c2_b = c2_b_x;
+ c2_b_y = 5.0 * c2_b;
+ c2_yout = c2_y - c2_b_y;
+ _SFD_EML_CALL(0U, chartInstance->c2_sfEvent, -3);
+ sf_debug_symbol_scope_pop();
+ *c2_b_yout = c2_yout;
+ _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 1U, chartInstance->c2_sfEvent);
+ sf_debug_check_for_state_inconsistency(_P5MachineNumber_,
+ chartInstance->chartNumber, chartInstance->instanceNumber);
+}
+
+static void initSimStructsc2_P5(SFc2_P5InstanceStruct *chartInstance)
+{
+}
+
+static void init_script_number_translation(uint32_T c2_machineNumber, uint32_T
+ c2_chartNumber)
+{
+}
+
+static const mxArray *c2_sf_marshallOut(void *chartInstanceVoid, void *c2_inData)
+{
+ const mxArray *c2_mxArrayOutData = NULL;
+ real_T c2_u;
+ const mxArray *c2_y = NULL;
+ SFc2_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc2_P5InstanceStruct *)chartInstanceVoid;
+ c2_mxArrayOutData = NULL;
+ c2_u = *(real_T *)c2_inData;
+ c2_y = NULL;
+ sf_mex_assign(&c2_y, sf_mex_create("y", &c2_u, 0, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_assign(&c2_mxArrayOutData, c2_y, FALSE);
+ return c2_mxArrayOutData;
+}
+
+static real_T c2_emlrt_marshallIn(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_yout, const char_T *c2_identifier)
+{
+ real_T c2_y;
+ emlrtMsgIdentifier c2_thisId;
+ c2_thisId.fIdentifier = c2_identifier;
+ c2_thisId.fParent = NULL;
+ c2_y = c2_b_emlrt_marshallIn(chartInstance, sf_mex_dup(c2_yout), &c2_thisId);
+ sf_mex_destroy(&c2_yout);
+ return c2_y;
+}
+
+static real_T c2_b_emlrt_marshallIn(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId)
+{
+ real_T c2_y;
+ real_T c2_d0;
+ sf_mex_import(c2_parentId, sf_mex_dup(c2_u), &c2_d0, 1, 0, 0U, 0, 0U, 0);
+ c2_y = c2_d0;
+ sf_mex_destroy(&c2_u);
+ return c2_y;
+}
+
+static void c2_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData)
+{
+ const mxArray *c2_yout;
+ const char_T *c2_identifier;
+ emlrtMsgIdentifier c2_thisId;
+ real_T c2_y;
+ SFc2_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc2_P5InstanceStruct *)chartInstanceVoid;
+ c2_yout = sf_mex_dup(c2_mxArrayInData);
+ c2_identifier = c2_varName;
+ c2_thisId.fIdentifier = c2_identifier;
+ c2_thisId.fParent = NULL;
+ c2_y = c2_b_emlrt_marshallIn(chartInstance, sf_mex_dup(c2_yout), &c2_thisId);
+ sf_mex_destroy(&c2_yout);
+ *(real_T *)c2_outData = c2_y;
+ sf_mex_destroy(&c2_mxArrayInData);
+}
+
+const mxArray *sf_c2_P5_get_eml_resolved_functions_info(void)
+{
+ const mxArray *c2_nameCaptureInfo;
+ c2_ResolvedFunctionInfo c2_info[3];
+ c2_ResolvedFunctionInfo (*c2_b_info)[3];
+ const mxArray *c2_m0 = NULL;
+ int32_T c2_i0;
+ c2_ResolvedFunctionInfo *c2_r0;
+ c2_nameCaptureInfo = NULL;
+ c2_nameCaptureInfo = NULL;
+ c2_b_info = (c2_ResolvedFunctionInfo (*)[3])c2_info;
+ (*c2_b_info)[0].context = "";
+ (*c2_b_info)[0].name = "sin";
+ (*c2_b_info)[0].dominantType = "double";
+ (*c2_b_info)[0].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/sin.m";
+ (*c2_b_info)[0].fileTimeLo = 1286818750U;
+ (*c2_b_info)[0].fileTimeHi = 0U;
+ (*c2_b_info)[0].mFileTimeLo = 0U;
+ (*c2_b_info)[0].mFileTimeHi = 0U;
+ (*c2_b_info)[1].context =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/sin.m";
+ (*c2_b_info)[1].name = "eml_scalar_sin";
+ (*c2_b_info)[1].dominantType = "double";
+ (*c2_b_info)[1].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/eml_scalar_sin.m";
+ (*c2_b_info)[1].fileTimeLo = 1286818736U;
+ (*c2_b_info)[1].fileTimeHi = 0U;
+ (*c2_b_info)[1].mFileTimeLo = 0U;
+ (*c2_b_info)[1].mFileTimeHi = 0U;
+ (*c2_b_info)[2].context = "";
+ (*c2_b_info)[2].name = "mtimes";
+ (*c2_b_info)[2].dominantType = "double";
+ (*c2_b_info)[2].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/mtimes.m";
+ (*c2_b_info)[2].fileTimeLo = 1289519692U;
+ (*c2_b_info)[2].fileTimeHi = 0U;
+ (*c2_b_info)[2].mFileTimeLo = 0U;
+ (*c2_b_info)[2].mFileTimeHi = 0U;
+ sf_mex_assign(&c2_m0, sf_mex_createstruct("nameCaptureInfo", 1, 3), FALSE);
+ for (c2_i0 = 0; c2_i0 < 3; c2_i0++) {
+ c2_r0 = &c2_info[c2_i0];
+ sf_mex_addfield(c2_m0, sf_mex_create("nameCaptureInfo", c2_r0->context, 15,
+ 0U, 0U, 0U, 2, 1, strlen(c2_r0->context)), "context", "nameCaptureInfo",
+ c2_i0);
+ sf_mex_addfield(c2_m0, sf_mex_create("nameCaptureInfo", c2_r0->name, 15, 0U,
+ 0U, 0U, 2, 1, strlen(c2_r0->name)), "name", "nameCaptureInfo", c2_i0);
+ sf_mex_addfield(c2_m0, sf_mex_create("nameCaptureInfo", c2_r0->dominantType,
+ 15, 0U, 0U, 0U, 2, 1, strlen(c2_r0->dominantType)), "dominantType",
+ "nameCaptureInfo", c2_i0);
+ sf_mex_addfield(c2_m0, sf_mex_create("nameCaptureInfo", c2_r0->resolved, 15,
+ 0U, 0U, 0U, 2, 1, strlen(c2_r0->resolved)), "resolved", "nameCaptureInfo",
+ c2_i0);
+ sf_mex_addfield(c2_m0, sf_mex_create("nameCaptureInfo", &c2_r0->fileTimeLo,
+ 7, 0U, 0U, 0U, 0), "fileTimeLo", "nameCaptureInfo", c2_i0);
+ sf_mex_addfield(c2_m0, sf_mex_create("nameCaptureInfo", &c2_r0->fileTimeHi,
+ 7, 0U, 0U, 0U, 0), "fileTimeHi", "nameCaptureInfo", c2_i0);
+ sf_mex_addfield(c2_m0, sf_mex_create("nameCaptureInfo", &c2_r0->mFileTimeLo,
+ 7, 0U, 0U, 0U, 0), "mFileTimeLo", "nameCaptureInfo", c2_i0);
+ sf_mex_addfield(c2_m0, sf_mex_create("nameCaptureInfo", &c2_r0->mFileTimeHi,
+ 7, 0U, 0U, 0U, 0), "mFileTimeHi", "nameCaptureInfo", c2_i0);
+ }
+
+ sf_mex_assign(&c2_nameCaptureInfo, c2_m0, FALSE);
+ sf_mex_emlrtNameCapturePostProcessR2012a(&c2_nameCaptureInfo);
+ return c2_nameCaptureInfo;
+}
+
+static const mxArray *c2_b_sf_marshallOut(void *chartInstanceVoid, void
+ *c2_inData)
+{
+ const mxArray *c2_mxArrayOutData = NULL;
+ int32_T c2_u;
+ const mxArray *c2_y = NULL;
+ SFc2_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc2_P5InstanceStruct *)chartInstanceVoid;
+ c2_mxArrayOutData = NULL;
+ c2_u = *(int32_T *)c2_inData;
+ c2_y = NULL;
+ sf_mex_assign(&c2_y, sf_mex_create("y", &c2_u, 6, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_assign(&c2_mxArrayOutData, c2_y, FALSE);
+ return c2_mxArrayOutData;
+}
+
+static int32_T c2_c_emlrt_marshallIn(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId)
+{
+ int32_T c2_y;
+ int32_T c2_i1;
+ sf_mex_import(c2_parentId, sf_mex_dup(c2_u), &c2_i1, 1, 6, 0U, 0, 0U, 0);
+ c2_y = c2_i1;
+ sf_mex_destroy(&c2_u);
+ return c2_y;
+}
+
+static void c2_b_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c2_mxArrayInData, const char_T *c2_varName, void *c2_outData)
+{
+ const mxArray *c2_b_sfEvent;
+ const char_T *c2_identifier;
+ emlrtMsgIdentifier c2_thisId;
+ int32_T c2_y;
+ SFc2_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc2_P5InstanceStruct *)chartInstanceVoid;
+ c2_b_sfEvent = sf_mex_dup(c2_mxArrayInData);
+ c2_identifier = c2_varName;
+ c2_thisId.fIdentifier = c2_identifier;
+ c2_thisId.fParent = NULL;
+ c2_y = c2_c_emlrt_marshallIn(chartInstance, sf_mex_dup(c2_b_sfEvent),
+ &c2_thisId);
+ sf_mex_destroy(&c2_b_sfEvent);
+ *(int32_T *)c2_outData = c2_y;
+ sf_mex_destroy(&c2_mxArrayInData);
+}
+
+static uint8_T c2_d_emlrt_marshallIn(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_b_is_active_c2_P5, const char_T *c2_identifier)
+{
+ uint8_T c2_y;
+ emlrtMsgIdentifier c2_thisId;
+ c2_thisId.fIdentifier = c2_identifier;
+ c2_thisId.fParent = NULL;
+ c2_y = c2_e_emlrt_marshallIn(chartInstance, sf_mex_dup(c2_b_is_active_c2_P5),
+ &c2_thisId);
+ sf_mex_destroy(&c2_b_is_active_c2_P5);
+ return c2_y;
+}
+
+static uint8_T c2_e_emlrt_marshallIn(SFc2_P5InstanceStruct *chartInstance, const
+ mxArray *c2_u, const emlrtMsgIdentifier *c2_parentId)
+{
+ uint8_T c2_y;
+ uint8_T c2_u0;
+ sf_mex_import(c2_parentId, sf_mex_dup(c2_u), &c2_u0, 1, 3, 0U, 0, 0U, 0);
+ c2_y = c2_u0;
+ sf_mex_destroy(&c2_u);
+ return c2_y;
+}
+
+static void init_dsm_address_info(SFc2_P5InstanceStruct *chartInstance)
+{
+}
+
+/* SFunction Glue Code */
+void sf_c2_P5_get_check_sum(mxArray *plhs[])
+{
+ ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(3969540396U);
+ ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(2398605791U);
+ ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(2194621761U);
+ ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(2188465508U);
+}
+
+mxArray *sf_c2_P5_get_autoinheritance_info(void)
+{
+ const char *autoinheritanceFields[] = { "checksum", "inputs", "parameters",
+ "outputs", "locals" };
+
+ mxArray *mxAutoinheritanceInfo = mxCreateStructMatrix(1,1,5,
+ autoinheritanceFields);
+
+ {
+ mxArray *mxChecksum = mxCreateString("OfvxwTNBO5vBbV6MicOfOG");
+ mxSetField(mxAutoinheritanceInfo,0,"checksum",mxChecksum);
+ }
+
+ {
+ const char *dataFields[] = { "size", "type", "complexity" };
+
+ mxArray *mxData = mxCreateStructMatrix(1,2,3,dataFields);
+
+ {
+ mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
+ double *pr = mxGetPr(mxSize);
+ pr[0] = (double)(1);
+ pr[1] = (double)(1);
+ mxSetField(mxData,0,"size",mxSize);
+ }
+
+ {
+ const char *typeFields[] = { "base", "fixpt" };
+
+ mxArray *mxType = mxCreateStructMatrix(1,1,2,typeFields);
+ mxSetField(mxType,0,"base",mxCreateDoubleScalar(10));
+ mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL));
+ mxSetField(mxData,0,"type",mxType);
+ }
+
+ mxSetField(mxData,0,"complexity",mxCreateDoubleScalar(0));
+
+ {
+ mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
+ double *pr = mxGetPr(mxSize);
+ pr[0] = (double)(1);
+ pr[1] = (double)(1);
+ mxSetField(mxData,1,"size",mxSize);
+ }
+
+ {
+ const char *typeFields[] = { "base", "fixpt" };
+
+ mxArray *mxType = mxCreateStructMatrix(1,1,2,typeFields);
+ mxSetField(mxType,0,"base",mxCreateDoubleScalar(10));
+ mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL));
+ mxSetField(mxData,1,"type",mxType);
+ }
+
+ mxSetField(mxData,1,"complexity",mxCreateDoubleScalar(0));
+ mxSetField(mxAutoinheritanceInfo,0,"inputs",mxData);
+ }
+
+ {
+ mxSetField(mxAutoinheritanceInfo,0,"parameters",mxCreateDoubleMatrix(0,0,
+ mxREAL));
+ }
+
+ {
+ const char *dataFields[] = { "size", "type", "complexity" };
+
+ mxArray *mxData = mxCreateStructMatrix(1,1,3,dataFields);
+
+ {
+ mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
+ double *pr = mxGetPr(mxSize);
+ pr[0] = (double)(1);
+ pr[1] = (double)(1);
+ mxSetField(mxData,0,"size",mxSize);
+ }
+
+ {
+ const char *typeFields[] = { "base", "fixpt" };
+
+ mxArray *mxType = mxCreateStructMatrix(1,1,2,typeFields);
+ mxSetField(mxType,0,"base",mxCreateDoubleScalar(10));
+ mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL));
+ mxSetField(mxData,0,"type",mxType);
+ }
+
+ mxSetField(mxData,0,"complexity",mxCreateDoubleScalar(0));
+ mxSetField(mxAutoinheritanceInfo,0,"outputs",mxData);
+ }
+
+ {
+ mxSetField(mxAutoinheritanceInfo,0,"locals",mxCreateDoubleMatrix(0,0,mxREAL));
+ }
+
+ return(mxAutoinheritanceInfo);
+}
+
+static const mxArray *sf_get_sim_state_info_c2_P5(void)
+{
+ const char *infoFields[] = { "chartChecksum", "varInfo" };
+
+ mxArray *mxInfo = mxCreateStructMatrix(1, 1, 2, infoFields);
+ const char *infoEncStr[] = {
+ "100 S1x2'type','srcId','name','auxInfo'{{M[1],M[7],T\"yout\",},{M[8],M[0],T\"is_active_c2_P5\",}}"
+ };
+
+ mxArray *mxVarInfo = sf_mex_decode_encoded_mx_struct_array(infoEncStr, 2, 10);
+ mxArray *mxChecksum = mxCreateDoubleMatrix(1, 4, mxREAL);
+ sf_c2_P5_get_check_sum(&mxChecksum);
+ mxSetField(mxInfo, 0, infoFields[0], mxChecksum);
+ mxSetField(mxInfo, 0, infoFields[1], mxVarInfo);
+ return mxInfo;
+}
+
+static void chart_debug_initialization(SimStruct *S, unsigned int
+ fullDebuggerInitialization)
+{
+ if (!sim_mode_is_rtw_gen(S)) {
+ SFc2_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc2_P5InstanceStruct *) ((ChartInfoStruct *)(ssGetUserData
+ (S)))->chartInstance;
+ if (ssIsFirstInitCond(S) && fullDebuggerInitialization==1) {
+ /* do this only if simulation is starting */
+ {
+ unsigned int chartAlreadyPresent;
+ chartAlreadyPresent = sf_debug_initialize_chart(_P5MachineNumber_,
+ 2,
+ 1,
+ 1,
+ 3,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ &(chartInstance->chartNumber),
+ &(chartInstance->instanceNumber),
+ ssGetPath(S),
+ (void *)S);
+ if (chartAlreadyPresent==0) {
+ /* this is the first instance */
+ init_script_number_translation(_P5MachineNumber_,
+ chartInstance->chartNumber);
+ sf_debug_set_chart_disable_implicit_casting(_P5MachineNumber_,
+ chartInstance->chartNumber,1);
+ sf_debug_set_chart_event_thresholds(_P5MachineNumber_,
+ chartInstance->chartNumber,
+ 0,
+ 0,
+ 0);
+ _SFD_SET_DATA_PROPS(0,1,1,0,"t");
+ _SFD_SET_DATA_PROPS(1,1,1,0,"y");
+ _SFD_SET_DATA_PROPS(2,2,0,1,"yout");
+ _SFD_STATE_INFO(0,0,2);
+ _SFD_CH_SUBSTATE_COUNT(0);
+ _SFD_CH_SUBSTATE_DECOMP(0);
+ }
+
+ _SFD_CV_INIT_CHART(0,0,0,0);
+
+ {
+ _SFD_CV_INIT_STATE(0,0,0,0,0,0,NULL,NULL);
+ }
+
+ _SFD_CV_INIT_TRANS(0,0,NULL,NULL,0,NULL);
+
+ /* Initialization of MATLAB Function Model Coverage */
+ _SFD_CV_INIT_EML(0,1,1,0,0,0,0,0,0,0);
+ _SFD_CV_INIT_EML_FCN(0,0,"eML_blk_kernel",0,-1,56);
+ _SFD_TRANS_COV_WTS(0,0,0,1,0);
+ if (chartAlreadyPresent==0) {
+ _SFD_TRANS_COV_MAPS(0,
+ 0,NULL,NULL,
+ 0,NULL,NULL,
+ 1,NULL,NULL,
+ 0,NULL,NULL);
+ }
+
+ _SFD_SET_DATA_COMPILED_PROPS(0,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0,
+ (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)NULL);
+ _SFD_SET_DATA_COMPILED_PROPS(1,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0,
+ (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)NULL);
+ _SFD_SET_DATA_COMPILED_PROPS(2,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0,
+ (MexFcnForType)c2_sf_marshallOut,(MexInFcnForType)c2_sf_marshallIn);
+
+ {
+ real_T *c2_t;
+ real_T *c2_y;
+ real_T *c2_yout;
+ c2_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ c2_y = (real_T *)ssGetInputPortSignal(chartInstance->S, 1);
+ c2_t = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
+ _SFD_SET_DATA_VALUE_PTR(0U, c2_t);
+ _SFD_SET_DATA_VALUE_PTR(1U, c2_y);
+ _SFD_SET_DATA_VALUE_PTR(2U, c2_yout);
+ }
+ }
+ } else {
+ sf_debug_reset_current_state_configuration(_P5MachineNumber_,
+ chartInstance->chartNumber,chartInstance->instanceNumber);
+ }
+ }
+}
+
+static const char* sf_get_instance_specialization()
+{
+ return "KwJhPuBtuwXq2wvLZJqQcC";
+}
+
+static void sf_opaque_initialize_c2_P5(void *chartInstanceVar)
+{
+ chart_debug_initialization(((SFc2_P5InstanceStruct*) chartInstanceVar)->S,0);
+ initialize_params_c2_P5((SFc2_P5InstanceStruct*) chartInstanceVar);
+ initialize_c2_P5((SFc2_P5InstanceStruct*) chartInstanceVar);
+}
+
+static void sf_opaque_enable_c2_P5(void *chartInstanceVar)
+{
+ enable_c2_P5((SFc2_P5InstanceStruct*) chartInstanceVar);
+}
+
+static void sf_opaque_disable_c2_P5(void *chartInstanceVar)
+{
+ disable_c2_P5((SFc2_P5InstanceStruct*) chartInstanceVar);
+}
+
+static void sf_opaque_gateway_c2_P5(void *chartInstanceVar)
+{
+ sf_c2_P5((SFc2_P5InstanceStruct*) chartInstanceVar);
+}
+
+extern const mxArray* sf_internal_get_sim_state_c2_P5(SimStruct* S)
+{
+ ChartInfoStruct *chartInfo = (ChartInfoStruct*) ssGetUserData(S);
+ mxArray *plhs[1] = { NULL };
+
+ mxArray *prhs[4];
+ int mxError = 0;
+ prhs[0] = mxCreateString("chart_simctx_raw2high");
+ prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
+ prhs[2] = (mxArray*) get_sim_state_c2_P5((SFc2_P5InstanceStruct*)
+ chartInfo->chartInstance); /* raw sim ctx */
+ prhs[3] = (mxArray*) sf_get_sim_state_info_c2_P5();/* state var info */
+ mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
+ mxDestroyArray(prhs[0]);
+ mxDestroyArray(prhs[1]);
+ mxDestroyArray(prhs[2]);
+ mxDestroyArray(prhs[3]);
+ if (mxError || plhs[0] == NULL) {
+ sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_raw2high'.\n");
+ }
+
+ return plhs[0];
+}
+
+extern void sf_internal_set_sim_state_c2_P5(SimStruct* S, const mxArray *st)
+{
+ ChartInfoStruct *chartInfo = (ChartInfoStruct*) ssGetUserData(S);
+ mxArray *plhs[1] = { NULL };
+
+ mxArray *prhs[4];
+ int mxError = 0;
+ prhs[0] = mxCreateString("chart_simctx_high2raw");
+ prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
+ prhs[2] = mxDuplicateArray(st); /* high level simctx */
+ prhs[3] = (mxArray*) sf_get_sim_state_info_c2_P5();/* state var info */
+ mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
+ mxDestroyArray(prhs[0]);
+ mxDestroyArray(prhs[1]);
+ mxDestroyArray(prhs[2]);
+ mxDestroyArray(prhs[3]);
+ if (mxError || plhs[0] == NULL) {
+ sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_high2raw'.\n");
+ }
+
+ set_sim_state_c2_P5((SFc2_P5InstanceStruct*)chartInfo->chartInstance,
+ mxDuplicateArray(plhs[0]));
+ mxDestroyArray(plhs[0]);
+}
+
+static const mxArray* sf_opaque_get_sim_state_c2_P5(SimStruct* S)
+{
+ return sf_internal_get_sim_state_c2_P5(S);
+}
+
+static void sf_opaque_set_sim_state_c2_P5(SimStruct* S, const mxArray *st)
+{
+ sf_internal_set_sim_state_c2_P5(S, st);
+}
+
+static void sf_opaque_terminate_c2_P5(void *chartInstanceVar)
+{
+ if (chartInstanceVar!=NULL) {
+ SimStruct *S = ((SFc2_P5InstanceStruct*) chartInstanceVar)->S;
+ if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) {
+ sf_clear_rtw_identifier(S);
+ }
+
+ finalize_c2_P5((SFc2_P5InstanceStruct*) chartInstanceVar);
+ free((void *)chartInstanceVar);
+ ssSetUserData(S,NULL);
+ }
+
+ unload_P5_optimization_info();
+}
+
+static void sf_opaque_init_subchart_simstructs(void *chartInstanceVar)
+{
+ initSimStructsc2_P5((SFc2_P5InstanceStruct*) chartInstanceVar);
+}
+
+extern unsigned int sf_machine_global_initializer_called(void);
+static void mdlProcessParameters_c2_P5(SimStruct *S)
+{
+ int i;
+ for (i=0;ichartInstance));
+ }
+}
+
+static void mdlSetWorkWidths_c2_P5(SimStruct *S)
+{
+ if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) {
+ mxArray *infoStruct = load_P5_optimization_info();
+ int_T chartIsInlinable =
+ (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct,
+ 2);
+ ssSetStateflowIsInlinable(S,chartIsInlinable);
+ ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(),
+ infoStruct,2,"RTWCG"));
+ ssSetEnableFcnIsTrivial(S,1);
+ ssSetDisableFcnIsTrivial(S,1);
+ ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S,
+ sf_get_instance_specialization(),infoStruct,2,
+ "gatewayCannotBeInlinedMultipleTimes"));
+ if (chartIsInlinable) {
+ ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL);
+ ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL);
+ sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(),
+ infoStruct,2,2);
+ sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(),
+ infoStruct,2,1);
+ }
+
+ sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,2);
+ ssSetHasSubFunctions(S,!(chartIsInlinable));
+ } else {
+ }
+
+ ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE);
+ ssSetChecksum0(S,(1570256104U));
+ ssSetChecksum1(S,(3518470837U));
+ ssSetChecksum2(S,(3004430004U));
+ ssSetChecksum3(S,(3376136691U));
+ ssSetmdlDerivatives(S, NULL);
+ ssSetExplicitFCSSCtrl(S,1);
+}
+
+static void mdlRTW_c2_P5(SimStruct *S)
+{
+ if (sim_mode_is_rtw_gen(S)) {
+ ssWriteRTWStrParam(S, "StateflowChartType", "Embedded MATLAB");
+ }
+}
+
+static void mdlStart_c2_P5(SimStruct *S)
+{
+ SFc2_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc2_P5InstanceStruct *)malloc(sizeof(SFc2_P5InstanceStruct));
+ memset(chartInstance, 0, sizeof(SFc2_P5InstanceStruct));
+ if (chartInstance==NULL) {
+ sf_mex_error_message("Could not allocate memory for chart instance.");
+ }
+
+ chartInstance->chartInfo.chartInstance = chartInstance;
+ chartInstance->chartInfo.isEMLChart = 1;
+ chartInstance->chartInfo.chartInitialized = 0;
+ chartInstance->chartInfo.sFunctionGateway = sf_opaque_gateway_c2_P5;
+ chartInstance->chartInfo.initializeChart = sf_opaque_initialize_c2_P5;
+ chartInstance->chartInfo.terminateChart = sf_opaque_terminate_c2_P5;
+ chartInstance->chartInfo.enableChart = sf_opaque_enable_c2_P5;
+ chartInstance->chartInfo.disableChart = sf_opaque_disable_c2_P5;
+ chartInstance->chartInfo.getSimState = sf_opaque_get_sim_state_c2_P5;
+ chartInstance->chartInfo.setSimState = sf_opaque_set_sim_state_c2_P5;
+ chartInstance->chartInfo.getSimStateInfo = sf_get_sim_state_info_c2_P5;
+ chartInstance->chartInfo.zeroCrossings = NULL;
+ chartInstance->chartInfo.outputs = NULL;
+ chartInstance->chartInfo.derivatives = NULL;
+ chartInstance->chartInfo.mdlRTW = mdlRTW_c2_P5;
+ chartInstance->chartInfo.mdlStart = mdlStart_c2_P5;
+ chartInstance->chartInfo.mdlSetWorkWidths = mdlSetWorkWidths_c2_P5;
+ chartInstance->chartInfo.extModeExec = NULL;
+ chartInstance->chartInfo.restoreLastMajorStepConfiguration = NULL;
+ chartInstance->chartInfo.restoreBeforeLastMajorStepConfiguration = NULL;
+ chartInstance->chartInfo.storeCurrentConfiguration = NULL;
+ chartInstance->S = S;
+ ssSetUserData(S,(void *)(&(chartInstance->chartInfo)));/* register the chart instance with simstruct */
+ init_dsm_address_info(chartInstance);
+ if (!sim_mode_is_rtw_gen(S)) {
+ }
+
+ sf_opaque_init_subchart_simstructs(chartInstance->chartInfo.chartInstance);
+ chart_debug_initialization(S,1);
+}
+
+void c2_P5_method_dispatcher(SimStruct *S, int_T method, void *data)
+{
+ switch (method) {
+ case SS_CALL_MDL_START:
+ mdlStart_c2_P5(S);
+ break;
+
+ case SS_CALL_MDL_SET_WORK_WIDTHS:
+ mdlSetWorkWidths_c2_P5(S);
+ break;
+
+ case SS_CALL_MDL_PROCESS_PARAMETERS:
+ mdlProcessParameters_c2_P5(S);
+ break;
+
+ default:
+ /* Unhandled method */
+ sf_mex_error_message("Stateflow Internal Error:\n"
+ "Error calling c2_P5_method_dispatcher.\n"
+ "Can't handle method %d.\n", method);
+ break;
+ }
+}
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c2_P5.h b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c2_P5.h
new file mode 100644
index 00000000..db8ad83c
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c2_P5.h
@@ -0,0 +1,45 @@
+#ifndef __c2_P5_h__
+#define __c2_P5_h__
+
+/* Include files */
+#include "sfc_sf.h"
+#include "sfc_mex.h"
+#include "rtwtypes.h"
+
+/* Type Definitions */
+typedef struct {
+ const char * context;
+ const char * name;
+ const char * dominantType;
+ const char * resolved;
+ uint32_T fileTimeLo;
+ uint32_T fileTimeHi;
+ uint32_T mFileTimeLo;
+ uint32_T mFileTimeHi;
+} c2_ResolvedFunctionInfo;
+
+typedef struct {
+ int32_T c2_sfEvent;
+ boolean_T c2_isStable;
+ boolean_T c2_doneDoubleBufferReInit;
+ uint8_T c2_is_active_c2_P5;
+ SimStruct *S;
+ ChartInfoStruct chartInfo;
+ uint32_T chartNumber;
+ uint32_T instanceNumber;
+} SFc2_P5InstanceStruct;
+
+/* Named Constants */
+
+/* Variable Declarations */
+
+/* Variable Definitions */
+
+/* Function Declarations */
+extern const mxArray *sf_c2_P5_get_eml_resolved_functions_info(void);
+
+/* Function Definitions */
+extern void sf_c2_P5_get_check_sum(mxArray *plhs[]);
+extern void c2_P5_method_dispatcher(SimStruct *S, int_T method, void *data);
+
+#endif
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c2_P5.o b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c2_P5.o
new file mode 100644
index 00000000..99385bc9
Binary files /dev/null and b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c2_P5.o differ
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c3_P5.c b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c3_P5.c
new file mode 100644
index 00000000..27b131fd
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c3_P5.c
@@ -0,0 +1,1056 @@
+/* Include files */
+
+#include "blascompat32.h"
+#include "P5_sfun.h"
+#include "c3_P5.h"
+#include "mwmathutil.h"
+#define CHARTINSTANCE_CHARTNUMBER (chartInstance->chartNumber)
+#define CHARTINSTANCE_INSTANCENUMBER (chartInstance->instanceNumber)
+#include "P5_sfun_debug_macros.h"
+
+/* Type Definitions */
+
+/* Named Constants */
+#define CALL_EVENT (-1)
+
+/* Variable Declarations */
+
+/* Variable Definitions */
+static const char * c3_debug_family_names[6] = { "nargin", "nargout", "t", "x",
+ "y", "yout" };
+
+/* Function Declarations */
+static void initialize_c3_P5(SFc3_P5InstanceStruct *chartInstance);
+static void initialize_params_c3_P5(SFc3_P5InstanceStruct *chartInstance);
+static void enable_c3_P5(SFc3_P5InstanceStruct *chartInstance);
+static void disable_c3_P5(SFc3_P5InstanceStruct *chartInstance);
+static void c3_update_debugger_state_c3_P5(SFc3_P5InstanceStruct *chartInstance);
+static const mxArray *get_sim_state_c3_P5(SFc3_P5InstanceStruct *chartInstance);
+static void set_sim_state_c3_P5(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_st);
+static void finalize_c3_P5(SFc3_P5InstanceStruct *chartInstance);
+static void sf_c3_P5(SFc3_P5InstanceStruct *chartInstance);
+static void initSimStructsc3_P5(SFc3_P5InstanceStruct *chartInstance);
+static void init_script_number_translation(uint32_T c3_machineNumber, uint32_T
+ c3_chartNumber);
+static const mxArray *c3_sf_marshallOut(void *chartInstanceVoid, void *c3_inData);
+static real_T c3_emlrt_marshallIn(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_yout, const char_T *c3_identifier);
+static real_T c3_b_emlrt_marshallIn(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_u, const emlrtMsgIdentifier *c3_parentId);
+static void c3_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c3_mxArrayInData, const char_T *c3_varName, void *c3_outData);
+static void c3_info_helper(c3_ResolvedFunctionInfo c3_info[13]);
+static real_T c3_mpower(SFc3_P5InstanceStruct *chartInstance, real_T c3_a);
+static const mxArray *c3_b_sf_marshallOut(void *chartInstanceVoid, void
+ *c3_inData);
+static int32_T c3_c_emlrt_marshallIn(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_u, const emlrtMsgIdentifier *c3_parentId);
+static void c3_b_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c3_mxArrayInData, const char_T *c3_varName, void *c3_outData);
+static uint8_T c3_d_emlrt_marshallIn(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_b_is_active_c3_P5, const char_T *c3_identifier);
+static uint8_T c3_e_emlrt_marshallIn(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_u, const emlrtMsgIdentifier *c3_parentId);
+static void init_dsm_address_info(SFc3_P5InstanceStruct *chartInstance);
+
+/* Function Definitions */
+static void initialize_c3_P5(SFc3_P5InstanceStruct *chartInstance)
+{
+ chartInstance->c3_sfEvent = CALL_EVENT;
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+ chartInstance->c3_is_active_c3_P5 = 0U;
+}
+
+static void initialize_params_c3_P5(SFc3_P5InstanceStruct *chartInstance)
+{
+}
+
+static void enable_c3_P5(SFc3_P5InstanceStruct *chartInstance)
+{
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+}
+
+static void disable_c3_P5(SFc3_P5InstanceStruct *chartInstance)
+{
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+}
+
+static void c3_update_debugger_state_c3_P5(SFc3_P5InstanceStruct *chartInstance)
+{
+}
+
+static const mxArray *get_sim_state_c3_P5(SFc3_P5InstanceStruct *chartInstance)
+{
+ const mxArray *c3_st;
+ const mxArray *c3_y = NULL;
+ real_T c3_hoistedGlobal;
+ real_T c3_u;
+ const mxArray *c3_b_y = NULL;
+ uint8_T c3_b_hoistedGlobal;
+ uint8_T c3_b_u;
+ const mxArray *c3_c_y = NULL;
+ real_T *c3_yout;
+ c3_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ c3_st = NULL;
+ c3_st = NULL;
+ c3_y = NULL;
+ sf_mex_assign(&c3_y, sf_mex_createcellarray(2), FALSE);
+ c3_hoistedGlobal = *c3_yout;
+ c3_u = c3_hoistedGlobal;
+ c3_b_y = NULL;
+ sf_mex_assign(&c3_b_y, sf_mex_create("y", &c3_u, 0, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_setcell(c3_y, 0, c3_b_y);
+ c3_b_hoistedGlobal = chartInstance->c3_is_active_c3_P5;
+ c3_b_u = c3_b_hoistedGlobal;
+ c3_c_y = NULL;
+ sf_mex_assign(&c3_c_y, sf_mex_create("y", &c3_b_u, 3, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_setcell(c3_y, 1, c3_c_y);
+ sf_mex_assign(&c3_st, c3_y, FALSE);
+ return c3_st;
+}
+
+static void set_sim_state_c3_P5(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_st)
+{
+ const mxArray *c3_u;
+ real_T *c3_yout;
+ c3_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ chartInstance->c3_doneDoubleBufferReInit = TRUE;
+ c3_u = sf_mex_dup(c3_st);
+ *c3_yout = c3_emlrt_marshallIn(chartInstance, sf_mex_dup(sf_mex_getcell(c3_u,
+ 0)), "yout");
+ chartInstance->c3_is_active_c3_P5 = c3_d_emlrt_marshallIn(chartInstance,
+ sf_mex_dup(sf_mex_getcell(c3_u, 1)), "is_active_c3_P5");
+ sf_mex_destroy(&c3_u);
+ c3_update_debugger_state_c3_P5(chartInstance);
+ sf_mex_destroy(&c3_st);
+}
+
+static void finalize_c3_P5(SFc3_P5InstanceStruct *chartInstance)
+{
+}
+
+static void sf_c3_P5(SFc3_P5InstanceStruct *chartInstance)
+{
+ real_T c3_hoistedGlobal;
+ real_T c3_b_hoistedGlobal;
+ real_T c3_c_hoistedGlobal;
+ real_T c3_t;
+ real_T c3_x;
+ real_T c3_y;
+ uint32_T c3_debug_family_var_map[6];
+ real_T c3_nargin = 3.0;
+ real_T c3_nargout = 1.0;
+ real_T c3_yout;
+ real_T c3_b_x;
+ real_T c3_c_x;
+ real_T c3_b;
+ real_T c3_b_y;
+ real_T c3_d_x;
+ real_T c3_e_x;
+ real_T c3_b_b;
+ real_T c3_c_y;
+ real_T c3_a;
+ real_T c3_c_b;
+ real_T c3_d_y;
+ real_T c3_f_x;
+ real_T c3_g_x;
+ real_T c3_d_b;
+ real_T c3_e_y;
+ real_T c3_h_x;
+ real_T c3_i_x;
+ real_T c3_e_b;
+ real_T c3_f_y;
+ real_T c3_b_a;
+ real_T c3_f_b;
+ real_T c3_g_y;
+ real_T c3_j_x;
+ real_T c3_k_x;
+ real_T c3_g_b;
+ real_T c3_h_y;
+ real_T c3_A;
+ real_T c3_B;
+ real_T c3_l_x;
+ real_T c3_i_y;
+ real_T c3_m_x;
+ real_T c3_j_y;
+ real_T c3_k_y;
+ real_T c3_n_x;
+ real_T c3_o_x;
+ real_T c3_h_b;
+ real_T c3_l_y;
+ real_T *c3_m_y;
+ real_T *c3_p_x;
+ real_T *c3_b_t;
+ real_T *c3_b_yout;
+ c3_b_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ c3_m_y = (real_T *)ssGetInputPortSignal(chartInstance->S, 2);
+ c3_p_x = (real_T *)ssGetInputPortSignal(chartInstance->S, 1);
+ c3_b_t = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
+ _sfTime_ = (real_T)ssGetT(chartInstance->S);
+ _SFD_CC_CALL(CHART_ENTER_SFUNCTION_TAG, 2U, chartInstance->c3_sfEvent);
+ _SFD_DATA_RANGE_CHECK(*c3_b_t, 0U);
+ _SFD_DATA_RANGE_CHECK(*c3_p_x, 1U);
+ _SFD_DATA_RANGE_CHECK(*c3_m_y, 2U);
+ _SFD_DATA_RANGE_CHECK(*c3_b_yout, 3U);
+ chartInstance->c3_sfEvent = CALL_EVENT;
+ _SFD_CC_CALL(CHART_ENTER_DURING_FUNCTION_TAG, 2U, chartInstance->c3_sfEvent);
+ c3_hoistedGlobal = *c3_b_t;
+ c3_b_hoistedGlobal = *c3_p_x;
+ c3_c_hoistedGlobal = *c3_m_y;
+ c3_t = c3_hoistedGlobal;
+ c3_x = c3_b_hoistedGlobal;
+ c3_y = c3_c_hoistedGlobal;
+ sf_debug_symbol_scope_push_eml(0U, 6U, 6U, c3_debug_family_names,
+ c3_debug_family_var_map);
+ sf_debug_symbol_scope_add_eml_importable(&c3_nargin, 0U, c3_sf_marshallOut,
+ c3_sf_marshallIn);
+ sf_debug_symbol_scope_add_eml_importable(&c3_nargout, 1U, c3_sf_marshallOut,
+ c3_sf_marshallIn);
+ sf_debug_symbol_scope_add_eml(&c3_t, 2U, c3_sf_marshallOut);
+ sf_debug_symbol_scope_add_eml(&c3_x, 3U, c3_sf_marshallOut);
+ sf_debug_symbol_scope_add_eml(&c3_y, 4U, c3_sf_marshallOut);
+ sf_debug_symbol_scope_add_eml_importable(&c3_yout, 5U, c3_sf_marshallOut,
+ c3_sf_marshallIn);
+ CV_EML_FCN(0, 0);
+ _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, 3);
+ c3_b_x = c3_t;
+ c3_c_x = c3_b_x;
+ c3_c_x = muDoubleScalarSin(c3_c_x);
+ c3_b = c3_c_x;
+ c3_b_y = -5.0 * c3_b;
+ c3_d_x = c3_t;
+ c3_e_x = c3_d_x;
+ c3_e_x = muDoubleScalarCos(c3_e_x);
+ c3_b_b = c3_e_x;
+ c3_c_y = 5.0 * c3_b_b;
+ c3_a = c3_b_y;
+ c3_c_b = c3_x - c3_c_y;
+ c3_d_y = c3_a * c3_c_b;
+ c3_f_x = c3_t;
+ c3_g_x = c3_f_x;
+ c3_g_x = muDoubleScalarCos(c3_g_x);
+ c3_d_b = c3_g_x;
+ c3_e_y = 5.0 * c3_d_b;
+ c3_h_x = c3_t;
+ c3_i_x = c3_h_x;
+ c3_i_x = muDoubleScalarSin(c3_i_x);
+ c3_e_b = c3_i_x;
+ c3_f_y = 5.0 * c3_e_b;
+ c3_b_a = c3_e_y;
+ c3_f_b = c3_y - c3_f_y;
+ c3_g_y = c3_b_a * c3_f_b;
+ c3_j_x = c3_t;
+ c3_k_x = c3_j_x;
+ c3_k_x = muDoubleScalarCos(c3_k_x);
+ c3_g_b = c3_k_x;
+ c3_h_y = 5.0 * c3_g_b;
+ c3_A = c3_d_y + c3_g_y;
+ c3_B = c3_mpower(chartInstance, c3_x - c3_h_y);
+ c3_l_x = c3_A;
+ c3_i_y = c3_B;
+ c3_m_x = c3_l_x;
+ c3_j_y = c3_i_y;
+ c3_k_y = c3_m_x / c3_j_y;
+ c3_n_x = c3_t;
+ c3_o_x = c3_n_x;
+ c3_o_x = muDoubleScalarSin(c3_o_x);
+ c3_h_b = c3_o_x;
+ c3_l_y = 5.0 * c3_h_b;
+ c3_yout = c3_k_y + c3_mpower(chartInstance, c3_y - c3_l_y);
+ _SFD_EML_CALL(0U, chartInstance->c3_sfEvent, -3);
+ sf_debug_symbol_scope_pop();
+ *c3_b_yout = c3_yout;
+ _SFD_CC_CALL(EXIT_OUT_OF_FUNCTION_TAG, 2U, chartInstance->c3_sfEvent);
+ sf_debug_check_for_state_inconsistency(_P5MachineNumber_,
+ chartInstance->chartNumber, chartInstance->instanceNumber);
+}
+
+static void initSimStructsc3_P5(SFc3_P5InstanceStruct *chartInstance)
+{
+}
+
+static void init_script_number_translation(uint32_T c3_machineNumber, uint32_T
+ c3_chartNumber)
+{
+}
+
+static const mxArray *c3_sf_marshallOut(void *chartInstanceVoid, void *c3_inData)
+{
+ const mxArray *c3_mxArrayOutData = NULL;
+ real_T c3_u;
+ const mxArray *c3_y = NULL;
+ SFc3_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc3_P5InstanceStruct *)chartInstanceVoid;
+ c3_mxArrayOutData = NULL;
+ c3_u = *(real_T *)c3_inData;
+ c3_y = NULL;
+ sf_mex_assign(&c3_y, sf_mex_create("y", &c3_u, 0, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_assign(&c3_mxArrayOutData, c3_y, FALSE);
+ return c3_mxArrayOutData;
+}
+
+static real_T c3_emlrt_marshallIn(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_yout, const char_T *c3_identifier)
+{
+ real_T c3_y;
+ emlrtMsgIdentifier c3_thisId;
+ c3_thisId.fIdentifier = c3_identifier;
+ c3_thisId.fParent = NULL;
+ c3_y = c3_b_emlrt_marshallIn(chartInstance, sf_mex_dup(c3_yout), &c3_thisId);
+ sf_mex_destroy(&c3_yout);
+ return c3_y;
+}
+
+static real_T c3_b_emlrt_marshallIn(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_u, const emlrtMsgIdentifier *c3_parentId)
+{
+ real_T c3_y;
+ real_T c3_d0;
+ sf_mex_import(c3_parentId, sf_mex_dup(c3_u), &c3_d0, 1, 0, 0U, 0, 0U, 0);
+ c3_y = c3_d0;
+ sf_mex_destroy(&c3_u);
+ return c3_y;
+}
+
+static void c3_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c3_mxArrayInData, const char_T *c3_varName, void *c3_outData)
+{
+ const mxArray *c3_yout;
+ const char_T *c3_identifier;
+ emlrtMsgIdentifier c3_thisId;
+ real_T c3_y;
+ SFc3_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc3_P5InstanceStruct *)chartInstanceVoid;
+ c3_yout = sf_mex_dup(c3_mxArrayInData);
+ c3_identifier = c3_varName;
+ c3_thisId.fIdentifier = c3_identifier;
+ c3_thisId.fParent = NULL;
+ c3_y = c3_b_emlrt_marshallIn(chartInstance, sf_mex_dup(c3_yout), &c3_thisId);
+ sf_mex_destroy(&c3_yout);
+ *(real_T *)c3_outData = c3_y;
+ sf_mex_destroy(&c3_mxArrayInData);
+}
+
+const mxArray *sf_c3_P5_get_eml_resolved_functions_info(void)
+{
+ const mxArray *c3_nameCaptureInfo;
+ c3_ResolvedFunctionInfo c3_info[13];
+ const mxArray *c3_m0 = NULL;
+ int32_T c3_i0;
+ c3_ResolvedFunctionInfo *c3_r0;
+ c3_nameCaptureInfo = NULL;
+ c3_nameCaptureInfo = NULL;
+ c3_info_helper(c3_info);
+ sf_mex_assign(&c3_m0, sf_mex_createstruct("nameCaptureInfo", 1, 13), FALSE);
+ for (c3_i0 = 0; c3_i0 < 13; c3_i0++) {
+ c3_r0 = &c3_info[c3_i0];
+ sf_mex_addfield(c3_m0, sf_mex_create("nameCaptureInfo", c3_r0->context, 15,
+ 0U, 0U, 0U, 2, 1, strlen(c3_r0->context)), "context", "nameCaptureInfo",
+ c3_i0);
+ sf_mex_addfield(c3_m0, sf_mex_create("nameCaptureInfo", c3_r0->name, 15, 0U,
+ 0U, 0U, 2, 1, strlen(c3_r0->name)), "name", "nameCaptureInfo", c3_i0);
+ sf_mex_addfield(c3_m0, sf_mex_create("nameCaptureInfo", c3_r0->dominantType,
+ 15, 0U, 0U, 0U, 2, 1, strlen(c3_r0->dominantType)), "dominantType",
+ "nameCaptureInfo", c3_i0);
+ sf_mex_addfield(c3_m0, sf_mex_create("nameCaptureInfo", c3_r0->resolved, 15,
+ 0U, 0U, 0U, 2, 1, strlen(c3_r0->resolved)), "resolved", "nameCaptureInfo",
+ c3_i0);
+ sf_mex_addfield(c3_m0, sf_mex_create("nameCaptureInfo", &c3_r0->fileTimeLo,
+ 7, 0U, 0U, 0U, 0), "fileTimeLo", "nameCaptureInfo", c3_i0);
+ sf_mex_addfield(c3_m0, sf_mex_create("nameCaptureInfo", &c3_r0->fileTimeHi,
+ 7, 0U, 0U, 0U, 0), "fileTimeHi", "nameCaptureInfo", c3_i0);
+ sf_mex_addfield(c3_m0, sf_mex_create("nameCaptureInfo", &c3_r0->mFileTimeLo,
+ 7, 0U, 0U, 0U, 0), "mFileTimeLo", "nameCaptureInfo", c3_i0);
+ sf_mex_addfield(c3_m0, sf_mex_create("nameCaptureInfo", &c3_r0->mFileTimeHi,
+ 7, 0U, 0U, 0U, 0), "mFileTimeHi", "nameCaptureInfo", c3_i0);
+ }
+
+ sf_mex_assign(&c3_nameCaptureInfo, c3_m0, FALSE);
+ sf_mex_emlrtNameCapturePostProcessR2012a(&c3_nameCaptureInfo);
+ return c3_nameCaptureInfo;
+}
+
+static void c3_info_helper(c3_ResolvedFunctionInfo c3_info[13])
+{
+ c3_info[0].context = "";
+ c3_info[0].name = "sin";
+ c3_info[0].dominantType = "double";
+ c3_info[0].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/sin.m";
+ c3_info[0].fileTimeLo = 1286818750U;
+ c3_info[0].fileTimeHi = 0U;
+ c3_info[0].mFileTimeLo = 0U;
+ c3_info[0].mFileTimeHi = 0U;
+ c3_info[1].context =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/sin.m";
+ c3_info[1].name = "eml_scalar_sin";
+ c3_info[1].dominantType = "double";
+ c3_info[1].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/eml_scalar_sin.m";
+ c3_info[1].fileTimeLo = 1286818736U;
+ c3_info[1].fileTimeHi = 0U;
+ c3_info[1].mFileTimeLo = 0U;
+ c3_info[1].mFileTimeHi = 0U;
+ c3_info[2].context = "";
+ c3_info[2].name = "mtimes";
+ c3_info[2].dominantType = "double";
+ c3_info[2].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/mtimes.m";
+ c3_info[2].fileTimeLo = 1289519692U;
+ c3_info[2].fileTimeHi = 0U;
+ c3_info[2].mFileTimeLo = 0U;
+ c3_info[2].mFileTimeHi = 0U;
+ c3_info[3].context = "";
+ c3_info[3].name = "cos";
+ c3_info[3].dominantType = "double";
+ c3_info[3].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/cos.m";
+ c3_info[3].fileTimeLo = 1286818706U;
+ c3_info[3].fileTimeHi = 0U;
+ c3_info[3].mFileTimeLo = 0U;
+ c3_info[3].mFileTimeHi = 0U;
+ c3_info[4].context =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/cos.m";
+ c3_info[4].name = "eml_scalar_cos";
+ c3_info[4].dominantType = "double";
+ c3_info[4].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/eml_scalar_cos.m";
+ c3_info[4].fileTimeLo = 1286818722U;
+ c3_info[4].fileTimeHi = 0U;
+ c3_info[4].mFileTimeLo = 0U;
+ c3_info[4].mFileTimeHi = 0U;
+ c3_info[5].context = "";
+ c3_info[5].name = "mpower";
+ c3_info[5].dominantType = "double";
+ c3_info[5].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/mpower.m";
+ c3_info[5].fileTimeLo = 1286818842U;
+ c3_info[5].fileTimeHi = 0U;
+ c3_info[5].mFileTimeLo = 0U;
+ c3_info[5].mFileTimeHi = 0U;
+ c3_info[6].context =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/mpower.m";
+ c3_info[6].name = "power";
+ c3_info[6].dominantType = "double";
+ c3_info[6].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/power.m";
+ c3_info[6].fileTimeLo = 1307651240U;
+ c3_info[6].fileTimeHi = 0U;
+ c3_info[6].mFileTimeLo = 0U;
+ c3_info[6].mFileTimeHi = 0U;
+ c3_info[7].context =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/power.m";
+ c3_info[7].name = "eml_scalar_eg";
+ c3_info[7].dominantType = "double";
+ c3_info[7].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/eml/eml_scalar_eg.m";
+ c3_info[7].fileTimeLo = 1286818796U;
+ c3_info[7].fileTimeHi = 0U;
+ c3_info[7].mFileTimeLo = 0U;
+ c3_info[7].mFileTimeHi = 0U;
+ c3_info[8].context =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/power.m";
+ c3_info[8].name = "eml_scalexp_alloc";
+ c3_info[8].dominantType = "double";
+ c3_info[8].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/eml/eml_scalexp_alloc.m";
+ c3_info[8].fileTimeLo = 1286818796U;
+ c3_info[8].fileTimeHi = 0U;
+ c3_info[8].mFileTimeLo = 0U;
+ c3_info[8].mFileTimeHi = 0U;
+ c3_info[9].context =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/power.m";
+ c3_info[9].name = "eml_scalar_floor";
+ c3_info[9].dominantType = "double";
+ c3_info[9].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/elfun/eml_scalar_floor.m";
+ c3_info[9].fileTimeLo = 1286818726U;
+ c3_info[9].fileTimeHi = 0U;
+ c3_info[9].mFileTimeLo = 0U;
+ c3_info[9].mFileTimeHi = 0U;
+ c3_info[10].context = "";
+ c3_info[10].name = "mrdivide";
+ c3_info[10].dominantType = "double";
+ c3_info[10].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/mrdivide.p";
+ c3_info[10].fileTimeLo = 1325124138U;
+ c3_info[10].fileTimeHi = 0U;
+ c3_info[10].mFileTimeLo = 1319729966U;
+ c3_info[10].mFileTimeHi = 0U;
+ c3_info[11].context =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/mrdivide.p";
+ c3_info[11].name = "rdivide";
+ c3_info[11].dominantType = "double";
+ c3_info[11].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/rdivide.m";
+ c3_info[11].fileTimeLo = 1286818844U;
+ c3_info[11].fileTimeHi = 0U;
+ c3_info[11].mFileTimeLo = 0U;
+ c3_info[11].mFileTimeHi = 0U;
+ c3_info[12].context =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/ops/rdivide.m";
+ c3_info[12].name = "eml_div";
+ c3_info[12].dominantType = "double";
+ c3_info[12].resolved =
+ "[ILXE]/usr/local/MATLAB/R2012a/toolbox/eml/lib/matlab/eml/eml_div.m";
+ c3_info[12].fileTimeLo = 1313347810U;
+ c3_info[12].fileTimeHi = 0U;
+ c3_info[12].mFileTimeLo = 0U;
+ c3_info[12].mFileTimeHi = 0U;
+}
+
+static real_T c3_mpower(SFc3_P5InstanceStruct *chartInstance, real_T c3_a)
+{
+ real_T c3_b_a;
+ real_T c3_ak;
+ c3_b_a = c3_a;
+ c3_ak = c3_b_a;
+ return muDoubleScalarPower(c3_ak, 2.0);
+}
+
+static const mxArray *c3_b_sf_marshallOut(void *chartInstanceVoid, void
+ *c3_inData)
+{
+ const mxArray *c3_mxArrayOutData = NULL;
+ int32_T c3_u;
+ const mxArray *c3_y = NULL;
+ SFc3_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc3_P5InstanceStruct *)chartInstanceVoid;
+ c3_mxArrayOutData = NULL;
+ c3_u = *(int32_T *)c3_inData;
+ c3_y = NULL;
+ sf_mex_assign(&c3_y, sf_mex_create("y", &c3_u, 6, 0U, 0U, 0U, 0), FALSE);
+ sf_mex_assign(&c3_mxArrayOutData, c3_y, FALSE);
+ return c3_mxArrayOutData;
+}
+
+static int32_T c3_c_emlrt_marshallIn(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_u, const emlrtMsgIdentifier *c3_parentId)
+{
+ int32_T c3_y;
+ int32_T c3_i1;
+ sf_mex_import(c3_parentId, sf_mex_dup(c3_u), &c3_i1, 1, 6, 0U, 0, 0U, 0);
+ c3_y = c3_i1;
+ sf_mex_destroy(&c3_u);
+ return c3_y;
+}
+
+static void c3_b_sf_marshallIn(void *chartInstanceVoid, const mxArray
+ *c3_mxArrayInData, const char_T *c3_varName, void *c3_outData)
+{
+ const mxArray *c3_b_sfEvent;
+ const char_T *c3_identifier;
+ emlrtMsgIdentifier c3_thisId;
+ int32_T c3_y;
+ SFc3_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc3_P5InstanceStruct *)chartInstanceVoid;
+ c3_b_sfEvent = sf_mex_dup(c3_mxArrayInData);
+ c3_identifier = c3_varName;
+ c3_thisId.fIdentifier = c3_identifier;
+ c3_thisId.fParent = NULL;
+ c3_y = c3_c_emlrt_marshallIn(chartInstance, sf_mex_dup(c3_b_sfEvent),
+ &c3_thisId);
+ sf_mex_destroy(&c3_b_sfEvent);
+ *(int32_T *)c3_outData = c3_y;
+ sf_mex_destroy(&c3_mxArrayInData);
+}
+
+static uint8_T c3_d_emlrt_marshallIn(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_b_is_active_c3_P5, const char_T *c3_identifier)
+{
+ uint8_T c3_y;
+ emlrtMsgIdentifier c3_thisId;
+ c3_thisId.fIdentifier = c3_identifier;
+ c3_thisId.fParent = NULL;
+ c3_y = c3_e_emlrt_marshallIn(chartInstance, sf_mex_dup(c3_b_is_active_c3_P5),
+ &c3_thisId);
+ sf_mex_destroy(&c3_b_is_active_c3_P5);
+ return c3_y;
+}
+
+static uint8_T c3_e_emlrt_marshallIn(SFc3_P5InstanceStruct *chartInstance, const
+ mxArray *c3_u, const emlrtMsgIdentifier *c3_parentId)
+{
+ uint8_T c3_y;
+ uint8_T c3_u0;
+ sf_mex_import(c3_parentId, sf_mex_dup(c3_u), &c3_u0, 1, 3, 0U, 0, 0U, 0);
+ c3_y = c3_u0;
+ sf_mex_destroy(&c3_u);
+ return c3_y;
+}
+
+static void init_dsm_address_info(SFc3_P5InstanceStruct *chartInstance)
+{
+}
+
+/* SFunction Glue Code */
+void sf_c3_P5_get_check_sum(mxArray *plhs[])
+{
+ ((real_T *)mxGetPr((plhs[0])))[0] = (real_T)(3596172227U);
+ ((real_T *)mxGetPr((plhs[0])))[1] = (real_T)(1888020841U);
+ ((real_T *)mxGetPr((plhs[0])))[2] = (real_T)(2998627020U);
+ ((real_T *)mxGetPr((plhs[0])))[3] = (real_T)(1871056003U);
+}
+
+mxArray *sf_c3_P5_get_autoinheritance_info(void)
+{
+ const char *autoinheritanceFields[] = { "checksum", "inputs", "parameters",
+ "outputs", "locals" };
+
+ mxArray *mxAutoinheritanceInfo = mxCreateStructMatrix(1,1,5,
+ autoinheritanceFields);
+
+ {
+ mxArray *mxChecksum = mxCreateString("7kbJwhOiUtMRzVQwHCKTGB");
+ mxSetField(mxAutoinheritanceInfo,0,"checksum",mxChecksum);
+ }
+
+ {
+ const char *dataFields[] = { "size", "type", "complexity" };
+
+ mxArray *mxData = mxCreateStructMatrix(1,3,3,dataFields);
+
+ {
+ mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
+ double *pr = mxGetPr(mxSize);
+ pr[0] = (double)(1);
+ pr[1] = (double)(1);
+ mxSetField(mxData,0,"size",mxSize);
+ }
+
+ {
+ const char *typeFields[] = { "base", "fixpt" };
+
+ mxArray *mxType = mxCreateStructMatrix(1,1,2,typeFields);
+ mxSetField(mxType,0,"base",mxCreateDoubleScalar(10));
+ mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL));
+ mxSetField(mxData,0,"type",mxType);
+ }
+
+ mxSetField(mxData,0,"complexity",mxCreateDoubleScalar(0));
+
+ {
+ mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
+ double *pr = mxGetPr(mxSize);
+ pr[0] = (double)(1);
+ pr[1] = (double)(1);
+ mxSetField(mxData,1,"size",mxSize);
+ }
+
+ {
+ const char *typeFields[] = { "base", "fixpt" };
+
+ mxArray *mxType = mxCreateStructMatrix(1,1,2,typeFields);
+ mxSetField(mxType,0,"base",mxCreateDoubleScalar(10));
+ mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL));
+ mxSetField(mxData,1,"type",mxType);
+ }
+
+ mxSetField(mxData,1,"complexity",mxCreateDoubleScalar(0));
+
+ {
+ mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
+ double *pr = mxGetPr(mxSize);
+ pr[0] = (double)(1);
+ pr[1] = (double)(1);
+ mxSetField(mxData,2,"size",mxSize);
+ }
+
+ {
+ const char *typeFields[] = { "base", "fixpt" };
+
+ mxArray *mxType = mxCreateStructMatrix(1,1,2,typeFields);
+ mxSetField(mxType,0,"base",mxCreateDoubleScalar(10));
+ mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL));
+ mxSetField(mxData,2,"type",mxType);
+ }
+
+ mxSetField(mxData,2,"complexity",mxCreateDoubleScalar(0));
+ mxSetField(mxAutoinheritanceInfo,0,"inputs",mxData);
+ }
+
+ {
+ mxSetField(mxAutoinheritanceInfo,0,"parameters",mxCreateDoubleMatrix(0,0,
+ mxREAL));
+ }
+
+ {
+ const char *dataFields[] = { "size", "type", "complexity" };
+
+ mxArray *mxData = mxCreateStructMatrix(1,1,3,dataFields);
+
+ {
+ mxArray *mxSize = mxCreateDoubleMatrix(1,2,mxREAL);
+ double *pr = mxGetPr(mxSize);
+ pr[0] = (double)(1);
+ pr[1] = (double)(1);
+ mxSetField(mxData,0,"size",mxSize);
+ }
+
+ {
+ const char *typeFields[] = { "base", "fixpt" };
+
+ mxArray *mxType = mxCreateStructMatrix(1,1,2,typeFields);
+ mxSetField(mxType,0,"base",mxCreateDoubleScalar(10));
+ mxSetField(mxType,0,"fixpt",mxCreateDoubleMatrix(0,0,mxREAL));
+ mxSetField(mxData,0,"type",mxType);
+ }
+
+ mxSetField(mxData,0,"complexity",mxCreateDoubleScalar(0));
+ mxSetField(mxAutoinheritanceInfo,0,"outputs",mxData);
+ }
+
+ {
+ mxSetField(mxAutoinheritanceInfo,0,"locals",mxCreateDoubleMatrix(0,0,mxREAL));
+ }
+
+ return(mxAutoinheritanceInfo);
+}
+
+static const mxArray *sf_get_sim_state_info_c3_P5(void)
+{
+ const char *infoFields[] = { "chartChecksum", "varInfo" };
+
+ mxArray *mxInfo = mxCreateStructMatrix(1, 1, 2, infoFields);
+ const char *infoEncStr[] = {
+ "100 S1x2'type','srcId','name','auxInfo'{{M[1],M[7],T\"yout\",},{M[8],M[0],T\"is_active_c3_P5\",}}"
+ };
+
+ mxArray *mxVarInfo = sf_mex_decode_encoded_mx_struct_array(infoEncStr, 2, 10);
+ mxArray *mxChecksum = mxCreateDoubleMatrix(1, 4, mxREAL);
+ sf_c3_P5_get_check_sum(&mxChecksum);
+ mxSetField(mxInfo, 0, infoFields[0], mxChecksum);
+ mxSetField(mxInfo, 0, infoFields[1], mxVarInfo);
+ return mxInfo;
+}
+
+static void chart_debug_initialization(SimStruct *S, unsigned int
+ fullDebuggerInitialization)
+{
+ if (!sim_mode_is_rtw_gen(S)) {
+ SFc3_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc3_P5InstanceStruct *) ((ChartInfoStruct *)(ssGetUserData
+ (S)))->chartInstance;
+ if (ssIsFirstInitCond(S) && fullDebuggerInitialization==1) {
+ /* do this only if simulation is starting */
+ {
+ unsigned int chartAlreadyPresent;
+ chartAlreadyPresent = sf_debug_initialize_chart(_P5MachineNumber_,
+ 3,
+ 1,
+ 1,
+ 4,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ &(chartInstance->chartNumber),
+ &(chartInstance->instanceNumber),
+ ssGetPath(S),
+ (void *)S);
+ if (chartAlreadyPresent==0) {
+ /* this is the first instance */
+ init_script_number_translation(_P5MachineNumber_,
+ chartInstance->chartNumber);
+ sf_debug_set_chart_disable_implicit_casting(_P5MachineNumber_,
+ chartInstance->chartNumber,1);
+ sf_debug_set_chart_event_thresholds(_P5MachineNumber_,
+ chartInstance->chartNumber,
+ 0,
+ 0,
+ 0);
+ _SFD_SET_DATA_PROPS(0,1,1,0,"t");
+ _SFD_SET_DATA_PROPS(1,1,1,0,"x");
+ _SFD_SET_DATA_PROPS(2,1,1,0,"y");
+ _SFD_SET_DATA_PROPS(3,2,0,1,"yout");
+ _SFD_STATE_INFO(0,0,2);
+ _SFD_CH_SUBSTATE_COUNT(0);
+ _SFD_CH_SUBSTATE_DECOMP(0);
+ }
+
+ _SFD_CV_INIT_CHART(0,0,0,0);
+
+ {
+ _SFD_CV_INIT_STATE(0,0,0,0,0,0,NULL,NULL);
+ }
+
+ _SFD_CV_INIT_TRANS(0,0,NULL,NULL,0,NULL);
+
+ /* Initialization of MATLAB Function Model Coverage */
+ _SFD_CV_INIT_EML(0,1,1,0,0,0,0,0,0,0);
+ _SFD_CV_INIT_EML_FCN(0,0,"eML_blk_kernel",0,-1,120);
+ _SFD_TRANS_COV_WTS(0,0,0,1,0);
+ if (chartAlreadyPresent==0) {
+ _SFD_TRANS_COV_MAPS(0,
+ 0,NULL,NULL,
+ 0,NULL,NULL,
+ 1,NULL,NULL,
+ 0,NULL,NULL);
+ }
+
+ _SFD_SET_DATA_COMPILED_PROPS(0,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0,
+ (MexFcnForType)c3_sf_marshallOut,(MexInFcnForType)NULL);
+ _SFD_SET_DATA_COMPILED_PROPS(1,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0,
+ (MexFcnForType)c3_sf_marshallOut,(MexInFcnForType)NULL);
+ _SFD_SET_DATA_COMPILED_PROPS(2,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0,
+ (MexFcnForType)c3_sf_marshallOut,(MexInFcnForType)NULL);
+ _SFD_SET_DATA_COMPILED_PROPS(3,SF_DOUBLE,0,NULL,0,0,0,0.0,1.0,0,0,
+ (MexFcnForType)c3_sf_marshallOut,(MexInFcnForType)c3_sf_marshallIn);
+
+ {
+ real_T *c3_t;
+ real_T *c3_x;
+ real_T *c3_y;
+ real_T *c3_yout;
+ c3_yout = (real_T *)ssGetOutputPortSignal(chartInstance->S, 1);
+ c3_y = (real_T *)ssGetInputPortSignal(chartInstance->S, 2);
+ c3_x = (real_T *)ssGetInputPortSignal(chartInstance->S, 1);
+ c3_t = (real_T *)ssGetInputPortSignal(chartInstance->S, 0);
+ _SFD_SET_DATA_VALUE_PTR(0U, c3_t);
+ _SFD_SET_DATA_VALUE_PTR(1U, c3_x);
+ _SFD_SET_DATA_VALUE_PTR(2U, c3_y);
+ _SFD_SET_DATA_VALUE_PTR(3U, c3_yout);
+ }
+ }
+ } else {
+ sf_debug_reset_current_state_configuration(_P5MachineNumber_,
+ chartInstance->chartNumber,chartInstance->instanceNumber);
+ }
+ }
+}
+
+static const char* sf_get_instance_specialization()
+{
+ return "gpOr5Mp2v1rgV5xrLnEACD";
+}
+
+static void sf_opaque_initialize_c3_P5(void *chartInstanceVar)
+{
+ chart_debug_initialization(((SFc3_P5InstanceStruct*) chartInstanceVar)->S,0);
+ initialize_params_c3_P5((SFc3_P5InstanceStruct*) chartInstanceVar);
+ initialize_c3_P5((SFc3_P5InstanceStruct*) chartInstanceVar);
+}
+
+static void sf_opaque_enable_c3_P5(void *chartInstanceVar)
+{
+ enable_c3_P5((SFc3_P5InstanceStruct*) chartInstanceVar);
+}
+
+static void sf_opaque_disable_c3_P5(void *chartInstanceVar)
+{
+ disable_c3_P5((SFc3_P5InstanceStruct*) chartInstanceVar);
+}
+
+static void sf_opaque_gateway_c3_P5(void *chartInstanceVar)
+{
+ sf_c3_P5((SFc3_P5InstanceStruct*) chartInstanceVar);
+}
+
+extern const mxArray* sf_internal_get_sim_state_c3_P5(SimStruct* S)
+{
+ ChartInfoStruct *chartInfo = (ChartInfoStruct*) ssGetUserData(S);
+ mxArray *plhs[1] = { NULL };
+
+ mxArray *prhs[4];
+ int mxError = 0;
+ prhs[0] = mxCreateString("chart_simctx_raw2high");
+ prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
+ prhs[2] = (mxArray*) get_sim_state_c3_P5((SFc3_P5InstanceStruct*)
+ chartInfo->chartInstance); /* raw sim ctx */
+ prhs[3] = (mxArray*) sf_get_sim_state_info_c3_P5();/* state var info */
+ mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
+ mxDestroyArray(prhs[0]);
+ mxDestroyArray(prhs[1]);
+ mxDestroyArray(prhs[2]);
+ mxDestroyArray(prhs[3]);
+ if (mxError || plhs[0] == NULL) {
+ sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_raw2high'.\n");
+ }
+
+ return plhs[0];
+}
+
+extern void sf_internal_set_sim_state_c3_P5(SimStruct* S, const mxArray *st)
+{
+ ChartInfoStruct *chartInfo = (ChartInfoStruct*) ssGetUserData(S);
+ mxArray *plhs[1] = { NULL };
+
+ mxArray *prhs[4];
+ int mxError = 0;
+ prhs[0] = mxCreateString("chart_simctx_high2raw");
+ prhs[1] = mxCreateDoubleScalar(ssGetSFuncBlockHandle(S));
+ prhs[2] = mxDuplicateArray(st); /* high level simctx */
+ prhs[3] = (mxArray*) sf_get_sim_state_info_c3_P5();/* state var info */
+ mxError = sf_mex_call_matlab(1, plhs, 4, prhs, "sfprivate");
+ mxDestroyArray(prhs[0]);
+ mxDestroyArray(prhs[1]);
+ mxDestroyArray(prhs[2]);
+ mxDestroyArray(prhs[3]);
+ if (mxError || plhs[0] == NULL) {
+ sf_mex_error_message("Stateflow Internal Error: \nError calling 'chart_simctx_high2raw'.\n");
+ }
+
+ set_sim_state_c3_P5((SFc3_P5InstanceStruct*)chartInfo->chartInstance,
+ mxDuplicateArray(plhs[0]));
+ mxDestroyArray(plhs[0]);
+}
+
+static const mxArray* sf_opaque_get_sim_state_c3_P5(SimStruct* S)
+{
+ return sf_internal_get_sim_state_c3_P5(S);
+}
+
+static void sf_opaque_set_sim_state_c3_P5(SimStruct* S, const mxArray *st)
+{
+ sf_internal_set_sim_state_c3_P5(S, st);
+}
+
+static void sf_opaque_terminate_c3_P5(void *chartInstanceVar)
+{
+ if (chartInstanceVar!=NULL) {
+ SimStruct *S = ((SFc3_P5InstanceStruct*) chartInstanceVar)->S;
+ if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) {
+ sf_clear_rtw_identifier(S);
+ }
+
+ finalize_c3_P5((SFc3_P5InstanceStruct*) chartInstanceVar);
+ free((void *)chartInstanceVar);
+ ssSetUserData(S,NULL);
+ }
+
+ unload_P5_optimization_info();
+}
+
+static void sf_opaque_init_subchart_simstructs(void *chartInstanceVar)
+{
+ initSimStructsc3_P5((SFc3_P5InstanceStruct*) chartInstanceVar);
+}
+
+extern unsigned int sf_machine_global_initializer_called(void);
+static void mdlProcessParameters_c3_P5(SimStruct *S)
+{
+ int i;
+ for (i=0;ichartInstance));
+ }
+}
+
+static void mdlSetWorkWidths_c3_P5(SimStruct *S)
+{
+ if (sim_mode_is_rtw_gen(S) || sim_mode_is_external(S)) {
+ mxArray *infoStruct = load_P5_optimization_info();
+ int_T chartIsInlinable =
+ (int_T)sf_is_chart_inlinable(S,sf_get_instance_specialization(),infoStruct,
+ 3);
+ ssSetStateflowIsInlinable(S,chartIsInlinable);
+ ssSetRTWCG(S,sf_rtw_info_uint_prop(S,sf_get_instance_specialization(),
+ infoStruct,3,"RTWCG"));
+ ssSetEnableFcnIsTrivial(S,1);
+ ssSetDisableFcnIsTrivial(S,1);
+ ssSetNotMultipleInlinable(S,sf_rtw_info_uint_prop(S,
+ sf_get_instance_specialization(),infoStruct,3,
+ "gatewayCannotBeInlinedMultipleTimes"));
+ if (chartIsInlinable) {
+ ssSetInputPortOptimOpts(S, 0, SS_REUSABLE_AND_LOCAL);
+ ssSetInputPortOptimOpts(S, 1, SS_REUSABLE_AND_LOCAL);
+ ssSetInputPortOptimOpts(S, 2, SS_REUSABLE_AND_LOCAL);
+ sf_mark_chart_expressionable_inputs(S,sf_get_instance_specialization(),
+ infoStruct,3,3);
+ sf_mark_chart_reusable_outputs(S,sf_get_instance_specialization(),
+ infoStruct,3,1);
+ }
+
+ sf_set_rtw_dwork_info(S,sf_get_instance_specialization(),infoStruct,3);
+ ssSetHasSubFunctions(S,!(chartIsInlinable));
+ } else {
+ }
+
+ ssSetOptions(S,ssGetOptions(S)|SS_OPTION_WORKS_WITH_CODE_REUSE);
+ ssSetChecksum0(S,(2641311199U));
+ ssSetChecksum1(S,(1255657893U));
+ ssSetChecksum2(S,(3731910375U));
+ ssSetChecksum3(S,(1688329310U));
+ ssSetmdlDerivatives(S, NULL);
+ ssSetExplicitFCSSCtrl(S,1);
+}
+
+static void mdlRTW_c3_P5(SimStruct *S)
+{
+ if (sim_mode_is_rtw_gen(S)) {
+ ssWriteRTWStrParam(S, "StateflowChartType", "Embedded MATLAB");
+ }
+}
+
+static void mdlStart_c3_P5(SimStruct *S)
+{
+ SFc3_P5InstanceStruct *chartInstance;
+ chartInstance = (SFc3_P5InstanceStruct *)malloc(sizeof(SFc3_P5InstanceStruct));
+ memset(chartInstance, 0, sizeof(SFc3_P5InstanceStruct));
+ if (chartInstance==NULL) {
+ sf_mex_error_message("Could not allocate memory for chart instance.");
+ }
+
+ chartInstance->chartInfo.chartInstance = chartInstance;
+ chartInstance->chartInfo.isEMLChart = 1;
+ chartInstance->chartInfo.chartInitialized = 0;
+ chartInstance->chartInfo.sFunctionGateway = sf_opaque_gateway_c3_P5;
+ chartInstance->chartInfo.initializeChart = sf_opaque_initialize_c3_P5;
+ chartInstance->chartInfo.terminateChart = sf_opaque_terminate_c3_P5;
+ chartInstance->chartInfo.enableChart = sf_opaque_enable_c3_P5;
+ chartInstance->chartInfo.disableChart = sf_opaque_disable_c3_P5;
+ chartInstance->chartInfo.getSimState = sf_opaque_get_sim_state_c3_P5;
+ chartInstance->chartInfo.setSimState = sf_opaque_set_sim_state_c3_P5;
+ chartInstance->chartInfo.getSimStateInfo = sf_get_sim_state_info_c3_P5;
+ chartInstance->chartInfo.zeroCrossings = NULL;
+ chartInstance->chartInfo.outputs = NULL;
+ chartInstance->chartInfo.derivatives = NULL;
+ chartInstance->chartInfo.mdlRTW = mdlRTW_c3_P5;
+ chartInstance->chartInfo.mdlStart = mdlStart_c3_P5;
+ chartInstance->chartInfo.mdlSetWorkWidths = mdlSetWorkWidths_c3_P5;
+ chartInstance->chartInfo.extModeExec = NULL;
+ chartInstance->chartInfo.restoreLastMajorStepConfiguration = NULL;
+ chartInstance->chartInfo.restoreBeforeLastMajorStepConfiguration = NULL;
+ chartInstance->chartInfo.storeCurrentConfiguration = NULL;
+ chartInstance->S = S;
+ ssSetUserData(S,(void *)(&(chartInstance->chartInfo)));/* register the chart instance with simstruct */
+ init_dsm_address_info(chartInstance);
+ if (!sim_mode_is_rtw_gen(S)) {
+ }
+
+ sf_opaque_init_subchart_simstructs(chartInstance->chartInfo.chartInstance);
+ chart_debug_initialization(S,1);
+}
+
+void c3_P5_method_dispatcher(SimStruct *S, int_T method, void *data)
+{
+ switch (method) {
+ case SS_CALL_MDL_START:
+ mdlStart_c3_P5(S);
+ break;
+
+ case SS_CALL_MDL_SET_WORK_WIDTHS:
+ mdlSetWorkWidths_c3_P5(S);
+ break;
+
+ case SS_CALL_MDL_PROCESS_PARAMETERS:
+ mdlProcessParameters_c3_P5(S);
+ break;
+
+ default:
+ /* Unhandled method */
+ sf_mex_error_message("Stateflow Internal Error:\n"
+ "Error calling c3_P5_method_dispatcher.\n"
+ "Can't handle method %d.\n", method);
+ break;
+ }
+}
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c3_P5.h b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c3_P5.h
new file mode 100644
index 00000000..a17aa676
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c3_P5.h
@@ -0,0 +1,45 @@
+#ifndef __c3_P5_h__
+#define __c3_P5_h__
+
+/* Include files */
+#include "sfc_sf.h"
+#include "sfc_mex.h"
+#include "rtwtypes.h"
+
+/* Type Definitions */
+typedef struct {
+ const char * context;
+ const char * name;
+ const char * dominantType;
+ const char * resolved;
+ uint32_T fileTimeLo;
+ uint32_T fileTimeHi;
+ uint32_T mFileTimeLo;
+ uint32_T mFileTimeHi;
+} c3_ResolvedFunctionInfo;
+
+typedef struct {
+ int32_T c3_sfEvent;
+ boolean_T c3_isStable;
+ boolean_T c3_doneDoubleBufferReInit;
+ uint8_T c3_is_active_c3_P5;
+ SimStruct *S;
+ ChartInfoStruct chartInfo;
+ uint32_T chartNumber;
+ uint32_T instanceNumber;
+} SFc3_P5InstanceStruct;
+
+/* Named Constants */
+
+/* Variable Declarations */
+
+/* Variable Definitions */
+
+/* Function Declarations */
+extern const mxArray *sf_c3_P5_get_eml_resolved_functions_info(void);
+
+/* Function Definitions */
+extern void sf_c3_P5_get_check_sum(mxArray *plhs[]);
+extern void c3_P5_method_dispatcher(SimStruct *S, int_T method, void *data);
+
+#endif
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c3_P5.o b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c3_P5.o
new file mode 100644
index 00000000..6b3e4d05
Binary files /dev/null and b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/c3_P5.o differ
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/rtwtypes.h b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/rtwtypes.h
new file mode 100644
index 00000000..2985441e
--- /dev/null
+++ b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/rtwtypes.h
@@ -0,0 +1,390 @@
+
+#ifndef __RTWTYPES_H__
+ #define __RTWTYPES_H__
+ #include "tmwtypes.h"
+
+/* This ID is used to detect inclusion of an incompatible rtwtypes.h */
+#define RTWTYPES_ID_C08S16I32L64N64F1
+
+ #include "simstruc_types.h"
+ #ifndef POINTER_T
+ # define POINTER_T
+ typedef void * pointer_T;
+ #endif
+ #ifndef TRUE
+ # define TRUE (1U)
+ #endif
+ #ifndef FALSE
+ # define FALSE (0U)
+ #endif
+ #ifndef MAT_FILE
+ # define MAT_FILE 0
+ #endif
+#ifndef INT64_T
+#define INT64_T
+typedef long int64_T;
+#endif
+#ifndef UINT64_T
+#define UINT64_T
+typedef unsigned long uint64_T;
+#endif
+
+/*===========================================================================*
+ * Additional complex number type definitions *
+ *===========================================================================*/
+#ifndef CINT64_T
+#define CINT64_T
+ typedef struct {
+ int64_T re;
+ int64_T im;
+ } cint64_T;
+
+#endif
+#ifndef CUINT64_T
+#define CUINT64_T
+ typedef struct {
+ uint64_T re;
+ uint64_T im;
+ } cuint64_T;
+
+#endif
+
+/*
+ * MultiWord supporting definitions
+ */
+typedef long int long_T;
+
+/*
+ * MultiWord types
+ */
+
+
+typedef struct {
+ uint64_T chunks[2];
+} int128m_T;
+
+typedef struct {
+ int128m_T re;
+ int128m_T im;
+} cint128m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[2];
+} uint128m_T;
+
+typedef struct {
+ uint128m_T re;
+ uint128m_T im;
+} cuint128m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[3];
+} int192m_T;
+
+typedef struct {
+ int192m_T re;
+ int192m_T im;
+} cint192m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[3];
+} uint192m_T;
+
+typedef struct {
+ uint192m_T re;
+ uint192m_T im;
+} cuint192m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[4];
+} int256m_T;
+
+typedef struct {
+ int256m_T re;
+ int256m_T im;
+} cint256m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[4];
+} uint256m_T;
+
+typedef struct {
+ uint256m_T re;
+ uint256m_T im;
+} cuint256m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[5];
+} int320m_T;
+
+typedef struct {
+ int320m_T re;
+ int320m_T im;
+} cint320m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[5];
+} uint320m_T;
+
+typedef struct {
+ uint320m_T re;
+ uint320m_T im;
+} cuint320m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[6];
+} int384m_T;
+
+typedef struct {
+ int384m_T re;
+ int384m_T im;
+} cint384m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[6];
+} uint384m_T;
+
+typedef struct {
+ uint384m_T re;
+ uint384m_T im;
+} cuint384m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[7];
+} int448m_T;
+
+typedef struct {
+ int448m_T re;
+ int448m_T im;
+} cint448m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[7];
+} uint448m_T;
+
+typedef struct {
+ uint448m_T re;
+ uint448m_T im;
+} cuint448m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[8];
+} int512m_T;
+
+typedef struct {
+ int512m_T re;
+ int512m_T im;
+} cint512m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[8];
+} uint512m_T;
+
+typedef struct {
+ uint512m_T re;
+ uint512m_T im;
+} cuint512m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[9];
+} int576m_T;
+
+typedef struct {
+ int576m_T re;
+ int576m_T im;
+} cint576m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[9];
+} uint576m_T;
+
+typedef struct {
+ uint576m_T re;
+ uint576m_T im;
+} cuint576m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[10];
+} int640m_T;
+
+typedef struct {
+ int640m_T re;
+ int640m_T im;
+} cint640m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[10];
+} uint640m_T;
+
+typedef struct {
+ uint640m_T re;
+ uint640m_T im;
+} cuint640m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[11];
+} int704m_T;
+
+typedef struct {
+ int704m_T re;
+ int704m_T im;
+} cint704m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[11];
+} uint704m_T;
+
+typedef struct {
+ uint704m_T re;
+ uint704m_T im;
+} cuint704m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[12];
+} int768m_T;
+
+typedef struct {
+ int768m_T re;
+ int768m_T im;
+} cint768m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[12];
+} uint768m_T;
+
+typedef struct {
+ uint768m_T re;
+ uint768m_T im;
+} cuint768m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[13];
+} int832m_T;
+
+typedef struct {
+ int832m_T re;
+ int832m_T im;
+} cint832m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[13];
+} uint832m_T;
+
+typedef struct {
+ uint832m_T re;
+ uint832m_T im;
+} cuint832m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[14];
+} int896m_T;
+
+typedef struct {
+ int896m_T re;
+ int896m_T im;
+} cint896m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[14];
+} uint896m_T;
+
+typedef struct {
+ uint896m_T re;
+ uint896m_T im;
+} cuint896m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[15];
+} int960m_T;
+
+typedef struct {
+ int960m_T re;
+ int960m_T im;
+} cint960m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[15];
+} uint960m_T;
+
+typedef struct {
+ uint960m_T re;
+ uint960m_T im;
+} cuint960m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[16];
+} int1024m_T;
+
+typedef struct {
+ int1024m_T re;
+ int1024m_T im;
+} cint1024m_T;
+
+
+
+typedef struct {
+ uint64_T chunks[16];
+} uint1024m_T;
+
+typedef struct {
+ uint1024m_T re;
+ uint1024m_T im;
+} cuint1024m_T;
+
+#endif /* __RTWTYPES_H__ */
diff --git a/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/rtwtypeschksum.mat b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/rtwtypeschksum.mat
new file mode 100644
index 00000000..94f3fdd3
Binary files /dev/null and b/ws2012/CE/uebungen/P5/slprj/_sfprj/P5/_self/sfun/src/rtwtypeschksum.mat differ
diff --git a/ws2012/CE/uebungen/Uebungsthemen.rtf b/ws2012/CE/uebungen/Uebungsthemen.rtf
new file mode 100644
index 00000000..b4e9787d
--- /dev/null
+++ b/ws2012/CE/uebungen/Uebungsthemen.rtf
@@ -0,0 +1,106 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\paperw11900\paperh16840\margl1440\margr1440\vieww12560\viewh8400\viewkind0
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc
+
+\f0\b\fs28 \cf0 Themen der \'dcbungen:
+\b0\fs24 \
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
+\cf0 \
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
+
+\b \cf0 \
+\'dcbung 0:
+\b0 \
+ - Begriffserkl\'e4rung: System, Modell, Simulation\
+ - Differentialgleichung: allgemeine und spezielle L\'f6sung eines linearen Differentialgleichungssystems
+\b \
+\
+\'dcbung 1:
+\b0 \
+ - Diskrete Ereignissimulation (DEVS)\
+ - Petrinetze\
+\
+
+\b \'dcbung 2:
+\b0 \
+ - Erzeugung von Zufall: lineare Kongruenzgeneratoren\
+ - Diskrete Ereignissimulation (DEVS) und Zufall\
+ - Warteschlangen und Zufall\
+\
+
+\b \'dcbung 3:
+\b0 \
+ - Differentialgleichungssysteme zu Richtungsfeldern zuordnen\
+ - Transformation von DGLs\
+ - Stabilit\'e4tsuntersuchung\
+\
+
+\b \'dcbung 4:
+\b0 \
+ - Steife Differentialgleichungssysteme\
+ - Berechnung von Gleichgewichtspunkten\
+ - Linearisierung um die Ruhelage\
+ - Linearisierung um eine Referenztrajektorie\
+\
+
+\b \'dcbung 5:
+\b0 \
+ - Gleitkommadarstellung\
+ - IEEE 754-Standard\
+ - Umwandlung von IEE -> Dezimal und umgekehrt\
+ - Rundungsfehler\
+ - Kondition und Stabilit\'e4t\
+\
+
+\b \'dcbung 6:
+\b0 \
+ - Fixpunktiteration\
+ - Newtonverfahren\
+ - Liniensuche\
+\
+
+\b \'dcbung 7:
+\b0 \
+ - Fixpunktiteration zum L\'f6sen linearer Gleichungssysteme\
+ - Zeitintegration\
+\
+
+\b \'dcbung 8:
+\b0 \
+ - Zeitintegration:\
+ - implizites/explizites Euler-Verfahren\
+ - Heun-Verfahren\
+ - Runge-Kutta-Verfahren 4. Ordnung\
+ - Fehlerordnung der Trapezregel\
+\
+
+\b \'dcbung 9:
+\b0 \
+ - Heizung an/aus: Anfangswertproblem, Schaltfunktion, explizites Euler-Verfahren, Schaltzeitpunkt\
+ - Schrittweitensteuerung\
+\
+
+\b \'dcbung 10:
+\b0 \
+ - Blockdiagrammdarstellung -> Differentialgleichung und umgekehrt\
+ - Physikalisches Modell: Bewegungsgleichung erstellen, allgemein Fragen zur Genauigkeit des Modells\
+\
+
+\b \'dcbung 11:\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
+
+\b0 \cf0 - Kind/Stab: Bewegungsgleichungen erstellen, Ruhelage, explizites Euler-Verfahren\
+ - Steife Differentialgleichungen: Blockdiagrammdarstellung, Jacobi-Matrix (Steifigkeitsma\'df)\
+ \
+\
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
+
+\b \cf0 \'dcbung 12:
+\b0 \
+ - Modellierung eines R\'e4uber-Beute-Systems: DGL aufstellen, System untersuchen (Ruhelage, Stabilit\'e4t, Steifheit)\
+ - Anwendung Paralllelschwingkreis: Transformation von DGL auf System 1. Ordnung. Eigenschaften der Eigenwerte, damit System umged\'e4mpft, ged\'e4mpft schwingt.\
+\
+\
+}
\ No newline at end of file
diff --git a/ws2012/CE/uebungen/matrikelnummer.rtf b/ws2012/CE/uebungen/matrikelnummer.rtf
new file mode 100644
index 00000000..88e0f9b1
--- /dev/null
+++ b/ws2012/CE/uebungen/matrikelnummer.rtf
@@ -0,0 +1,11 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
+{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\paperw11900\paperh16840\margl1440\margr1440\vieww10800\viewh8400\viewkind0
+\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural
+
+\f0\fs24 \cf0 auf jede \'dcbungsabgabe -> Name + Matrikelnummer\
+\
+ - Michael Scholz (Matr.# 1576630)\
+ - David Kaufmann (Matr.# 1481864)\
+ - Dennis Werner (Matr.# 1513509)}
\ No newline at end of file