This project has moved. For the latest updates, please go here.

Subtract vector from matrix?

Jun 9, 2014 at 10:55 AM
Hi,

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

Thanks
Ioannis
Coordinator
Jun 9, 2014 at 9: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 10: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
Coordinator
Jun 10, 2014 at 12: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