@2ck Hadamard produce isnt really sufficient if what you are multiplying against isnt the same dimensions as the matrix you want to diagonalize. So that still isnt sufficient for me. In my case I had a Nx1 I needed to multiple against a 3x2. I attached the example.
@freemo @2ck That's diag(). You just multiply by the appropriately-shaped unity before Hadamard, i.e. for a column vector x and matrix A, diag(x)⋅A = (x⋅1ᵀ)∘A