Version [91340]
Dies ist eine alte Version von Plots erstellt von Christian am 2018-09-24 13:42:14.
Einfache verschiedene Grundplots
Liniendiagramm

x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)

x = linspace(-2*pi,2*pi);
y1 = sin(x);
y2 = cos(x);
plot(x,y1,x,y2)

x = 0:pi/100:2*pi;
y1 = sin(x);
y2 = sin(x-0.25);
y3 = sin(x-0.5);
plot(x,y1,x,y2,'--',x,y3,':')
Säulendiagramm

y = [10 15 20 30 22];
bar(y)

x = 1900:10:2000;
y = [10 15 20 30 22];
bar(x,y)

y = [10 15 20 30 22];
bar(y,0.5)

y = [1 2 3; 4 5 6; 7 8 9; 10 11 12];
bar(y)

y = [1 5 9; 2 6 10; 3 7 11; 4 8 12];
bar(y,'stacked')
Balkendiagramm

y = [10 15 20 30 22];
barh(y)

x = 1900:10:2000;
y = [10 15 20 30 22];
barh(x,y)

y = [10 15 20 30 22];
barh(y,0.5)

y = [1 2 3; 4 5 6; 7 8 9; 10 11 12];
barh(y)

y = [1 5 9; 2 6 10; 3 7 11; 4 8 12];
barh(y,'stacked')
Histogramm

x = randn(500,1);
histogram(x)

x = randn(500,1);
nbins = 25;
histogram(x,nbins)
Histogramm - 3D

x = randn(500,1);
y = randn(500,1);
histogram2(x,y)

x = randn (1000,1);
y = randn (1000,1);
nbins = 5;
histogramm2 (x, y, nbins)