% GEND file gend.m Marginal and joint dbn for integer compound demand % Version of 5/21/97 % Calculates marginal distribution for compound demand D % and joint distribution for {N,D} in the integer ca...% GEND file gend.m Marginal and joint dbn for integer compound demand % Version of 5/21/97 % Calculates marginal distribution for compound demand D % and joint distribution for {N,D} in the integer case % Do not forget zero coefficients for missing powers % in the generating functions for N, Y disp('Do not forget zero coefficients for missing powers') gn = input('Enter gen fn COEFFICIENTS for gN '); gy = input('Enter gen fn COEFFICIENTS for gY '); n = length(gn) - 1; % Highest power in gN m = l…