Azzera filtri
Azzera filtri

Why won't this function to generate a beta binomial distribution work?

3 visualizzazioni (ultimi 30 giorni)
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?

Risposte (0)

Categorie

Scopri di più su Fourier Analysis and Filtering in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by