Please Help! How to fix this error "Not enough input arguments." I have marked the error line in BOLD.
1 view (last 30 days)
Show older comments
function pr=prnab(Ex,Dx,xa,xb)
% Prawdopodbienstwo zmiennej losowej normalnej w przedziale: xa <= X < xb
% wart. oczek. - Ex
% odchyl. standardowe - Dx
% dolna wartosc - xa
% gorna wartosc - xb
% Standaryzacja zmiennej losowej: t=(x-Ex)/Dx
% Wywolanie funkcji erf(t)
% erf(t)=2/sqrt(pi)*calka(od 0 do t)[exp(-t^2]dt
% F(t)=0.5+0.5*erf(t/sqrt(2)) dla t >= 0
% F(t)=0.5-0.5*erf(t/sqrt(2)) dla t < 0
% Obliczenie wartosci dystrybuanty dla gornej wartosci xb
tb=(xb-Ex)/Dx;
Fb=0.5*(1+sign(tb)*erf( abs(tb)/sqrt(2) ));
% Obliczenie wartosci dystrybuanty dla dolnej wartosci xa
ta=(xa-Ex)/Dx;
Fa=0.5*(1+sign(ta)*erf( abs(ta)/sqrt(2) ));
% Prawdopodobienstwo pr=P{xa <= X < xb }
pr=(Fb-Fa);
end %koniec prnab()
3 Comments
Image Analyst
on 20 Jun 2021
How did you call the function? What are the input values?
% Assign input values:
Ex = ?????
Dx = ??????
xa = ?????
xb = ?????
% Now, call the function here.
pr = prnab(Ex, Dx, xa, xb)
You didn't just click the green run triangle without assigning any values did you?
Answers (0)
See Also
Categories
Find more on Introduction to Installation and Licensing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!