input variable in evalin
이전 댓글 표시
y=double(evalin(symengine, 'binomial(2634,1)*binomial(1360*125-2634, 125-1)/binomial(1360*125, 125)'))
The above gives sume number y. but instead of 1 I want variable x in the above equation.
function y=f(x)
y=double(evalin(symengine, 'binomial(2634,x)*binomial(1360*125-2634, 125-x)/binomial(1360*125, 125)'))
end
Of course this gives an error. How can I make function using the input variable x? Thank you.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 일반 연산에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!