tuappr Enter matrix [a b] of X-range endpoints [0 1] Enter matrix [c d] of Y-range endpoints [0 1] Enter number of X approximation points 100 Enter number of Y approximation points 100 Enter expressio...tuappr Enter matrix [a b] of X-range endpoints [0 1] Enter matrix [c d] of Y-range endpoints [0 1] Enter number of X approximation points 100 Enter number of Y approximation points 100 Enter expression for joint density 60*t.^2.*u.*(u<=1-t) Use array operations on X, Y, PX, PY, t, u, and P G = (t<=0.5).*t.^2 + 2*(t>0.5).*u; EZx = sum(G.*P)./sum(P); % Approximation eZx = (X<=0.5).*X.^2 + (4/3)*(X>0.5).*(1-X); % Theoretical plot(X,EZx,'k-',X,eZx,'k-.') % Plotting details % See Figure 14.1.4