How is rs defined? If it is not a scalar, then the error is caused by
1/(1-rs/r)
You cannot divide the scalar "1" by a matrix. You instead need to use element-wise division like you have elsewhere in your code. Specifically, the code would instead be:
1./(1-rs/r)
Otherwise, to troubleshoot the issue, break down your definition of fD into variables. Define a variable for each matrix, and then compare the dimensions of the matrices to ensure they are appropriate for each /, ./, and .* operation.