photo

Prashanth Reddy Penta Reddy


Aktiv seit 2017

Followers: 0   Following: 0

Statistik

  • First Answer

Abzeichen anzeigen

Feeds

Anzeigen nach

Beantwortet
Write a function called halfsum that takes as input an at most two-dimensional array A and computes the sum of the elements of A that are in the lower right triangular part of A
function u = halfsum(P) u1 = P(end:-1:1, 1:end); u2 = triu(u1); u = sum(u2(:)); end

etwa 7 Jahre vor | 2