to compute some basic computational algorithms, and, might need a ride on someone's back if you do not mind:
f = @(x) nchoosek(5,x)*0.1.^x*0.9.^(5-x)
@(x) nchoosek (5, x) * 0.1 .^ x * 0.9 .^ (5 - x)
error: Invalid call to nchoosek. Correct usage is:
-- Function File: C = nchoosek (N, K)
-- Function File: C = nchoosek (SET, K)
How do I call the function therefore?
error: called from
print_usage at line 90 column 5
nchoosek at line 96 column 5
at line -1 column -1
error: evaluating argument list element number 1
>> ans = sum([1:5]);
ans = 15
I am trying to compare this with MathLab as well, but I have some stumbling blocks with MathLab.
Please consider your environmental responsibility before printing this e-mail.
I usually reply to emails within 2 business days. If it's urgent, give me a call.