Why won't this function to generate a beta binomial distribution work?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am new to function writing and don't understand the error message I am getting when I try to run this function
function y=bbinopdf(x,n,a,b)
y= beta(x+a,n-x+b)/beta(a,b)
end
Define values as
x=[1:1:100];
a=1;
b=1;
n=10;
I can enter bbinopdf(x,n,a,b) with no error but then there is no output. If I use y=bbinopdf(x,n,a,b) I get
Error in bbinopdf (line 1)
function y=bbinopdf(x,n,a,b)
Output argument "y" (and maybe others) not assigned during
call to
"/Users/awetten/Documents/MATLAB/bbinopdf.m>bbinopdf".
Can anyone help- please?
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Special Functions en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!