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!