Informatik Flashcards

(108 cards)

1
Q

Liniengraph

A

plot(x,y)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Streugraph

A

scatter(x,y)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Balkendiagramm

A

bar(x,y)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Kuchendiagramm

A

pie(y)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

x-Wertebereich eines Graphen

A

linspace(xAnfang, xEnde, AnzahlWerte)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Graphfenster erzeugen

A

figure(1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Mehrere Graphen darstellen oder Bearbeiten

A

hold on

hold off

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Gleichung für 32-Bit IEEE 754 Zahlen

A

x= (-1)^s(1+(M/2^23))2^(E-127)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Alle definierten Variablen ausgeben

A

whos

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Variable löschen

A

clear(Variablenname)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Hilfe zu einer Funktion

A

doc Funktionsname

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Kommandofenster löschen

A

clc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Ausgabe im Kommandofenster formatieren

A

format
format long
format rat
format bank

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Betrag einer (Imaginären)Zahl

A

abs(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Vorzeichenfunktion

A

sign

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Runden zur nächsten ganzen Zahl

A

round(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Runden zur nächsten kleineren Zahl

A

floor(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Runden zur nächsten größeren Zahl

A

ceil(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Abschneiden der Nachkommastellen

A

fix(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Exponentialfunktion

A

exp(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Potenzfunktion

A

power(x,b)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Quadratwurzelfunktion

A

sqrt(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Natürlicher Logarithmus

A

log(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

2erLogarithmus

A

log2(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Dekadischer Logarithmus
log10(x)
26
Trigonometrische Funktionen im Bogenmaß
``` sin cos tan asin acos atan ```
27
Trigonometrische Funktion in Grad
``` sind cosd tand asind acosd atand ```
28
Komponentenweise Rechenoperationen
./ .* .^
29
Matrixtransposition
transm=m'
30
Länge eines Vektors
l=length(v)
31
Euklidische Norm eines Vektors
en=norm(v)
32
Kreuzprodukt
kp=cross(v1,v2)
33
Anzahl der Zeilen und Spalten einer Matrix
[ns nz]=size(m)
34
Inverse einer Matrix
m2=inv(m)
35
Eigenwerte einer Matrix
e=eig(m)
36
Determinante
d=det(m)
37
Rang einer Matrix
r=rank(m)
38
Lösung eines linearen Gleichungssystems
x=inv(m)*b
39
Angeben einer Komplexen Zahl
z=complex(real,imaginär)
40
Realteil
r=real(z)
41
Imaginärteil
im=imag(z)
42
Phasenwinkel einer komplexen Zahl
pw=angle(z)
43
Konjugiert Komplexe Zahl
kz=conj(z)
44
Eingabe im Kommandefenster
x=input('hier eingeben') | text=input('hier eingeben','s')
45
Zeilenumbruch im Kommandofenster erzwingen
\n
46
Ausgabe im Kommandofenster
disp(x)
47
Formatierte Ausgabe im Kommandofenster
fprintf(...)
48
Platzhalter der formatierten Ausgabe
%i Integer %s String %f Floatingpoint
49
NAchkomma und Gesamtstellen der formatierten Ausgabe
%8.3f
50
Ausgabe von Sonderzeichen
fprintf('%% \\ '' \n')
51
Logische Operatoren
``` == gleich ~= ungleich > größer < kleiner >= größer gleich <= kleiner gleich && logisches UND || logisches ODER ~ logisches NICHT ```
52
if-Anweisung
if Bedingung else end
53
switch-case
``` switch Variable case 1 case 2 case 3 otherwise end ```
54
for Schleife
``` for x=[1 2 3 4 6 8] for x= 1:20 for x = -2:0,5:2 for x=linspace(0,10,20) for txt={'Laura' 'Bernhard' 'Cristina'} end ```
55
While-Schleife
while Bedingung | end
56
Endlosschleife
while 1 | end
57
Eingriff in die Schleife
continue --> zurück zum Schleifenkopf | break --> Zum Anfang der nächten Schleife oder zum Ende
58
Dateiformate für readtable
``` .xls .xlsx .xlsb .xlsm .xltm .xltx .ods .txt .dat .csv ```
59
Tabellen einlesen
tab=readtable('Dateiname')
60
Ganze Spalte auswählen
x=tab{:,1}
61
Ganze Zeile auswählen
x=tab{1,:}
62
Modifikationen für readtable
T=readtable('Dateiname','Delimiter',';','Headerlines','2','ReadVariableNames','false')
63
Tabellen erstellen
tab=table(Spalte1, Spalte2)
64
Tabellen abspeichern
writetable(Tabelle,'Name')
65
Ausgabe in eine String-Variable
text=sprintf(...)
66
Liste mit Dateinamen erstellen
Liste=dir('Dateiname*.csv') | *Platzhalter
67
Attribute einer Liste
``` Liste(Element).name Liste(Element).date Liste(Element).byte Liste(Element).isdir Liste(Element).datenum x=length(Liste) ```
68
Degugging
try catch end
69
Zufallszahlen
rand gleichförmig verteilt zw. 0
70
Zufallszahlen mit anderem Mü und sigma
zs=z*sigma + mü
71
Histogramm plotten
histogram(zs,20)
72
Mittelwert
mitt=mean(Vektor)
73
Standartabweichung
stdabweich=std(Vektor)
74
Minimum und Maximum eines Vektors
vmin=min(Vektor) | vmax=max(Vektor)
75
Minimum und Maximum und Postion im Vektor
[Minimum Index]=min(Vektor)
76
Definition einer Funktion
``` function [y1,...,yn] = Funktionsname(x1,...,xn) end ```
77
Verzeichnispfad hinzufügen
addpath('Pfad')
78
Verzeichnispfad entfernen
rmpath('Pfad')
79
Verzeichnispfade ausgeben
path
80
Liniendiagramm formatieren
plot(x,y,'LineWidth',2,'Color',[1 0 0],'LineStyle','--')
81
Steudiagramme formatieren
``` scatter(x,y,'Marker','*',MarkerFaceColor',[1 0 1],'MarkerEdgeColor',[1 1 0]) Marker: * s d ° ```
82
Balkendiagramm formatieren
bar(x,y,'BarWidth',2,'FaceColor',[0 0 0],'EdgeColor',[1 0 0],'Linewidth',2)
83
Titel einfügen
title('Titel','FontSize',14)
84
Achsenbeschriftung einfügen
XLabel('Text') | YLabel('Text')
85
Text einfügen
text(xPosition, yPosition,'Text')
86
Sonderzeichen
``` \alpha \beta \gamma ... \leftarrow \rightarrow \neq ungleich \leq kleinergleich \geq größergleich \approx ungefähr \pm plusminus \infty unendlich ```
87
Feste Variablen
pi ans -Inf Inf NaN i,j
88
Hochstellen bei Text
e^abs = e^a *bs | e^{abs}
89
Legende einfügen
legend('Text1''Text2''Text3')
90
Gitternetz
grid on;
91
Handles
h=figure(1) h. Units ='Centimeters' h. Position=[xPostion xPostion XGröße yGröße] h. PaperUnits h. PaperSize[XGröße YGröße]
92
Graph speichern
print(h,'Name','-dDateiformat')
93
Zugriff auf Achsen
ha= gca;
94
Achsenattribute
ha. FontSize ha. FontWeight ha. XLim ha. XScale ha. XTick[1 2] ha. XTickLabel{'1' '2'} ha. XAxisLocation ha. Box ha. Visible
95
Mehrere Graphen in einem Fenster
subplot(Zeilenzahl,Spaltenzahl,AktiviertesFenster)
96
Datum ausgeben
datestr(now,'HH:MM dd.mm.yyyy')
97
String durch anderen ersetzen
txt=strrep(txtalt,'Suchwort','Ersatzwort')
98
Strings vergleichen
strcmp | strcmpi (ignoriert Groß und Kleinschreibung)
99
Cellarray
x={VAriable1 Variable2} | x={v1;V2}
100
Zugriff auf CellArray
``` x(1) Zugriff auf 1.Zelle x(1:3) Zugriff auf Zelle 1-3 x(3:end) Zugriff auf Zelle 3-letzte x[1 4] Zugriff auf Zelle 1 und 4 x{1} Zugriff auf den Inhalt von Zelle 1 ```
101
Vektoren sortieren
vsort=sort(v) | vsort=sort(v,'descend')
102
Vektor sortieren mit Indexierung
[Vektors Index]=sort(v)
103
Werte in Vektor finden
ind=find(a<0) | aneg=a(ind)
104
Überprüfen auf bestimmte Werte
isempty isnan isinf
105
Position in Prozent
n=length(xsort) | pc=(index-1)/(n-1)*100
106
Lineare Regression
p=polyfit(x,y,1) | gopt=p(1)*x +p(2)
107
Reaktion 2.Ordnung
``` C(t)=1/(kt+(1/C0)) Linearisierung: 1/C(t)=kt+1/C0 --> C(t)=1/y --> a=k C0=1/b par=polyfit(x,1/y,1) a=par(1) b=par(2) k=a C0=1/b yfit=1./(k*x+1/C0) ```
108
Reaktion 1.Ordnung
C(t)=C0*exp(-kt)