Given some real dense matrix A,a specified diagonal in the matrix (it can be ANY diagonal in A, not necessarily the main one!), and a scalar constant c, is it possible to produce an expression that will give matrix B, which is all the same matrix as A, but with the elements on the specified diagonal multiplied by c? The expression should use only basic linear algebra operations (like multiplications by some special matrices that depend on c).
An example:
A=[1, 2, 3, 4
5, 6, 7, 8]
(bold numbers are the specified diagonal)
B=f(A,c)=[1, 2, 3*c, 4
5, 6, 7, 8*c]
P.S. What I actually need is a method to multiply each diagonal in A by some constant (i.e. if A is of size n*m then we have vector c of length (n+m-1)). But I think that if there exists a method to multiply one diagonal, then it will be pretty easy to generalize it for all diagonals.