git-svn-id: http://moon:8086/svn/matlab/trunk@153 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
2021-03-22 20:28:22 +00:00
parent 1b5742e13e
commit b31f3e7435
140 changed files with 6054 additions and 0 deletions
Executable
+32
View File
@@ -0,0 +1,32 @@
% ##################################################################################
% ## Loesung: Gleichverteilter zeitdiskreter stochastischer Prozess ##
% ##################################################################################
N=10000;
% ##### Teilaufgabe a: Rauschfolge #####
n = rand(N,1);
% ##### Teilaufgabe b: Histogramm #####
n = rand(N,1);
[H,x] = hist(n,30);
H = H/N; % Damit H eine Schaetzung der Wahrscheinlichkeitsdichte
% ist, muss die Flaeche eins sein
figure; bar(x,H);grid; xlabel('x'); ylabel('f_X(x)');
title(['Gleichvert. Mittelw.=',num2str(mean(n)),' Var.=',num2str(std(n).^2)]);
% ##### Teilaufgabe c: Mittelwert und Varianz #####
n = rand(N,1);
m = mean(n);
s = std(n);
% ##### Teilaufgabe d: Musterfunktion #####
for k=1:5
n = rand(N,1);
[H,x]=hist(n,30);
H = H/N;
figure; bar(x,H); grid; xlabel('x'); ylabel('f_X(x)');
title(['Gleichvert. Mittelw.=',num2str(mean(n)),' Var.=',num2str(std(n).^2)]);
end;
% ##### EOF #####