Why is the mean function not working?
古いコメントを表示
clc
x=randn(1,100000);
y=randn(1,100000);
Za=x+10;
[f,x]=hist(Za,100); %Simulated PDF
bar(x,f/trapz(x,f));
hold on;
title('normalized histogram');
ym = mean(Za)
yv = var(Za)
2 件のコメント
per isakson
2018 年 5 月 5 日
編集済み: per isakson
2018 年 5 月 5 日
What do you mean by "function not working"?
Here, R2016a, your code works according to my expectations.
dpb
2018 年 5 月 5 日
Sometime you've probably inadvertentedly written mean on the LHS and aliased the function...see what
which mean
returns and try
clear mean
and see if symptoms don't disappear. (The new Crystal Ball Toolbox)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Uniform Distribution (Continuous) についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!