hi, i have a code in which in a for loop the cumulative sum of the equation needs to be used in the next loop and then put into another equation but i am having issues with matrix/array sizes.
This is my code:
For this calculation the cumulative value of w has to be used to find the next change in w, the cumulative sum of w then has to be used to find the change in e and then the sumulative sum of e is then plotted against the time vector.
The issue i am having is when i create the vector dw by adding (jj) after it this error appears:
Incorrect dimensions for raising a matrix to a power. Check that the matrix is square and the power is a scalar. To perform elementwise
matrix powers, use '.^'.
Error in TEST (line 33)
if i use'.^' the matrix dimensions do not agree.
Any advice is welcome, thanks