i have a question regarding sums in MATLAB using the symsum function.
I want to implement this function where ti is the i-th value from the array:
t={2, 5, 6, 10} as an example for n=4
and U is a symbolic variable.
is that somehow possible?
syms i, u
t={2, 5, 6, 10}
symsum((u-i+1)*t{i},i,1,10);
Matlab then gives me the error:
Error using sym/subsindex (line 769)
Invalid indexing or function definition. When defining a function, ensure that the arguments are
symbolic variables and the body of the function is a SYM expression.
Can someone help me? Thanks in advance
Edit: Changed example formula
