from
Factorial of Large Numbers (>170)
by Nabin S Sharma
Use of Symbolic Math Toolbox to calculate the factorial of large numbers.
|
| example.m |
% Problem 2.11
% An Introduction to Thermal Physics by D.V. Schroeder
% Refer to the problem for details
%
% Functions used: fact.m
% Nabin Sagar Sharma
% UMass Dartmouth
% October 25, 2008
%
N = 100;
Q = 80;
Om = zeros(1,81);
for q = 0:Q
num1 = fact(q+N-1);
num2 = fact(q);
num3 = fact(N-1);
temp = num1/(num2*num3);
Om(q+1) = double(temp);
end
Om1 = Om;
Om2 = fliplr(Om);
Om3 = Om1.*Om2;
plot([0:80],Om3);
xlabel('\itq');
ylabel('\Omega_{TOTAL}');
|
|
Contact us at files@mathworks.com