Quantcast
Viewing all articles
Browse latest Browse all 971

New Post: How to apply operation over vector from each row/column of a matrix?

Hi Federico,

I don't fully understand yet what the operation should do. What does Functions.Sum(v, Axis.Rows) do and how does it relate to ones * diag(v), exactly?

Maybe you're looking for FoldRows(f,state) which applies a binary function to each row vector of the matrix and a state vector (where the result becomes the state for the next row)? See also "Enumerators and Higher Order Functions" in Matrices and Vectors.

Thanks,
Christoph

Viewing all articles
Browse latest Browse all 971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>