% ICALC file icalc.m Calculation setup for independent pair % Version of 5/3/95 % Joint calculation setup for independent pair X = input('Enter row matrix of X-values '); Y = input('Enter row matrix of Y-values '); PX = input('Enter X probabilities '); PY = input('Enter Y probabilities '); [a,b] = meshgrid(PX,fliplr(PY)); P = a.*b; % Matrix of joint independent probabilities [t,u] = meshgrid(X,fliplr(Y)); % t, u matrices for joint calculations disp(' Use array operations on matrices X, Y, PX, PY, t, u, and P')