I wrote a small Octave script involving cumsum on symbolic vectors, which I expected to work but unfortunately, it does not.
Here's the code:
pkg load symbolic
n = 3;
syms q x
q = sym('q', [n 1]);
x = sym('x', [n 1]);
cumsum(q - x)
Instead of the expected result, I get:
error: cumsum: wrong type argument 'class'
Why does this happen? Would it work with Matlab Symbolic Toolbox? (I don't have it so I cannot test, unfortunately.)