This project has moved and is read-only. For the latest updates, please go here.

Subtract vector from matrix?

Jun 9, 2014 at 11:55 AM
Hi,

is there some function to subtract vector from matrix column-wise or row-wise?

Thanks
Ioannis
Jun 9, 2014 at 10:57 PM
Hi Ioannis

With column-wise you mean to subtract the vector from each column-vector of the matrix, or from a specific single column-vector specified by its index?

Thanks,
Christoph
Jun 9, 2014 at 11:03 PM
Hi Christoph,

I mean the first one, subtract the vector from each column-vector of the matrix. I know I could do this with a for loop, I just wonder whether there is some function or some other way.

Thanks,
Ioannis
Jun 10, 2014 at 1:57 PM
The F# extension package does have an unoptimized mapCols function that could be used here, but we have not propagated this back into the core library yet. This could be a useful addition though.

Thanks,
Christoph