% % Written by: % -- % John L. Weatherwax 2007-09-10 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; drawnow; clc; clear; N = 3; denom = nchoosek(2*N,N) format rat; M = zeros(4); M(1,1) = 1.0; M(4,4) = 1.0; i=1; for j=0:2, M(i+1,j+1) = nchoosek(2*i,j)*nchoosek(2*N-2*i,N-j) / denom ; end i=2; for j=1:3, M(i+1,j+1) = nchoosek(2*i,j)*nchoosek(2*N-2*i,N-j) / denom ; end M