my attempt:
function [ positive, negative ] = Untitled2( x )
%UNTITLED2 Summary of this function goes here
% Detailed explanation goes here
positive=0;
negative=0;
for k=1:length(x)
for j=1:length(x)
if x(k,j)>0
positive=positive+x(k,j)
end
if x(k,j)<0
negative=negative+x(k,j)
end
end
end
positive=positive
negative-negative
end