Consider a vector $\mathbf{g} \in \mathbb{R}^{m}$ and a matrix $\mathbf{A} \equiv \mathbf{A(g)} \in \mathcal{M}_{p\times q} \[\mathbb{R}\]$, a function of $\mathbf{g}$.

Furthermore, let $\mathbf{S} \in \mathcal{M}_{p \times r} \[\mathbb{R}\]$, independent of $\mathbf{g}$.

Is it a way to calculate $\displaystyle \frac{\partial L(\mathbf{A}, \mathbf{S})}{\partial g_i}$, where $L(\cdot)$ is the `linsolve`

Matlab function?

One can suppose that $\displaystyle \frac{\partial \mathbf{A}}{\partial g_i}$ is known.

`linsolve`

does. Please do some work and read the Matlab documentation for us. :) I guess it is simply`A^{+}S`

(Moore-Penrose pseudoinverse)? – Federico Poloni Aug 18 '12 at 14:58