%% Math 230, Spring 2011 %% Function for Problem 7 in Homework 10 function [C,s] = SqrDiff(A,B); % check if sizes of A and B are the same. If yes, proceed. if size(A)==size(B) C = A.^2 - B.^2; s = sum(sum(C)); else disp('Sizes of A and B not same. Quitting ...'); end