Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
356 B
1
Indexable
Never
A = input('Unesi matricu: ');
[M,N] = size(A);
in = 0;
for i = 1 : M
  for j = 1 : N
    if (rem(A(i,j),2)==0)
      in = in + 1;
    end
    if (i < j)
      A(i,j) = -2 * (i.^3 - 3*j)./(2*(i.^2)*j);
    elseif i == j
      A(i,j) = sqrt(i) + j - j.^2;
    elseif i > j
      A(i,j) = sqrt(j).^5 + i/2 - 2*i*j;
    end
  end
end
disp(in);