I have created a code in VBA to compute the computation amount for the second type of sterling numbers. But only half the price is correct in the following example.
The result should be 1,7,6,1 if n is 4 is equal to. (
I get 1,7,6,5,4,16
sub stirlingerjahlen () in the form of double dim subsum as integer dim sum in the form of DM n Long duration Jammu as Long Dim J for long N = 4 for k = 1 n phase 1 Jammu = 0 to Kashmir phase 1 subsum = 1 / application.WorksheetFunction.Fact (k) * ( -1) ^ (k - j) * Applications Worksheet Function Facts (K) / Applications WorksheetFunction.Fact (j) * J ^ N Amount = Yoga + subsum Next Sheets ("Table 2"). Room (K, 1) = y C z = 0 Next End Sub
Can anybody make a mistake?
There is another version of the formula that is easy to implement:
(page 13)
and the updated code here:
Sub Stirlingerjlen dimmed as long as Jammu and Kashmir As long as the dim J is long for N = 4 for k = 1, phase 1 Jammu = 0 to k subsum = ((-1) ^ ( K-j)) * ((j ^ N) / (application. Worksheet Function. Fate (j) * app Worksheet Function. Fault (K - J)))) = sum + subsum next sheet ("Table 2"). Cell (K, 1) = sum zodiac = 0 next end sub
No comments:
Post a Comment