Write a function called halfsum that takes as input a matrix and computes the sum of its elements that are in the diagonal or are to the right of it. The output arguments name is summa.
I have absolutely no idea how to start with this problem. How am I meant to use a for-loop for this?
Thank you very much