MATLAB: Linear equation with summation

back slashlinear equationsummation

The equation is given as . D and A are given through matrices. I need to calculate q.
I use operator / to solve linear equation, so that q=A/D. The question is, how to account for summation in this case? q=0,before cycle and then q=q+q;?

Best Answer

q=A/D should already account for the summation. Your equation can be written just by replacing the summation with simple matrix multiplication. In this form, the equation is just q*D=A and you have rightly used q=A/D to solve it.