Array indices must be positive integers or logical values.
6 views (last 30 days)
Walter Roberson on 5 Jul 2022
Remember that MATLAB has no implied multiplication, so your code is asking to take 1 divided by (Nt indexed at something), where you probably meant (1 divided by Nt) times something
Note: there is no documented syntax for symsum() with three inputs -- only four inputs or two inputs. In each case, the first input needs to be a symbolic function or symbolic expression, and the second input needs to be the symbolic variable to take the summation over.
If your hd or hk are vectors of length Nt that you are wanting to sum, do not use symsum() for that: just use sum(). symsum() is for the case where you are hoping to find formulaes for the summation, such as if you input the expression for the taylor series of a function and you are hoping to identify the function.