How to make a search for pseudodiagonal for a rectangular matrix?

for(i = 0; i < N; ++i){ for(j = i; j >= 0; --j) printf("%d ", mat[j][i - j]); puts(""); } for(j = 1; j < N; ++j){ for(i = j; i < N; ++i) printf("%d ", mat[N - 1 - (i - j)][i]); puts(""); } 

PS This is an algorithm for iterating pseudodiagonal for a square matrix.

  • Your question smoothly flows from with in math. And what is a pseudodiagonal for a rectangular matrix? - nick_n_a
  • Draw a picture for yourself at least. Better two. 1-for square. 2-for rectangular. Then the question is perhaps the answer itself is requested. - nick_n_a

0