I have a variable X which is a 1x48 cell containing matrices of sizes Ax128. The number of A differs between the matrices. Basically, I want to calculate the derivative of each matrix individually along each row. How can I do that? If say, one of the matrices is 34x128, the end result of this matrix should be 34x127.