Aufgabe 3.1 - Plotten von diskreten Werten
- Erzeugen Sie nunächst ein eindimensionales Feld x von 51 aufsteigenden Zahlen zwischen 0 und 5.
- Plotten Sie
sin(x)
über x
.
- Plotten Sie in einer Figur die Funktionen
und
über x
.
- Plotten Sie nun die Kurve (
cos(x),sin(x))
in einem neuen Fenster.
Musterlösung 2
|
y = sin(x);
subplot(2,2,1)
plot(x,y,'--')
title('sin(x)')
xlabel('x')
ylabel('y')
grid on;
|
Musterlösung 3
|
y1 = x.*sin(x);
y2 = x.*log(x);
subplot(2,2,2)
plot(x, y1, 'r.');
hold on;
plot(x, y2, 'b-');
title('x*sin(x) | x*log(x)')
xlabel('x')
ylabel('y')
grid on;
|
Musterlösung 4
|
t = (0:pi/100:2*pi);
x = sin(t);
y = cos(t);
subplot(2,2,3)
plot(x,y,'g.-');
title('cos(x) ueber sin(x)')
xlabel('x')
ylabel('y')
grid on;
|
Musterlösung 5
|
[X,Y] = meshgrid(0:0.1:5,0:0.1:5);
Z = X.*sin(Y);
subplot(2,2,4)
%surf(X,Y,Z);
%surfc(X,Y,Z);
%plot3(X,Y,Z);
mesh(X,Y,Z);
%axis equal
title('x*sin(y)')
xlabel('x')
ylabel('y')
zlabel('z')
grid on;
rotate3d on;
|
Aufgabe 3.2 - Plotten von symbolischen Funktionen
- Recherchieren Sie, welche Befehle es in MATLAB zur Darstellung von Funktionsgraphen gibt.
- Zeichnen Sie folgenden symbolischen Funktionsgraphen



- Recherchieren Sie, welche Befehle es in MATLAB zur Darstellung von Funktionsgraphen von Funktionen zweier Veränderlicher gibt.


→ Termine 1 2
→ MATLAB® Befehlsübersicht
→ zurück zum Hauptartikel: MATLAB Repetitorium