So I tried doing it with a mix of funcionhandles and symbolic summation
prodSkip = @(v,k) prod([v(1:k-1), v(k+1:end)]); % product skipping k
syms ind
d = @(i) symsum(a(ind)*prodwok(b-c(i),ind), ind, 1, N));
Where then [d(1),..d(N)] would be the wanted result. However this doesn't work, as it produces the error:
Error using sym/subsindex (line 855)
Invalid indexing or function definition. Indexing must follow MATLAB indexing. Function arguments must be
symbolic variables, and function body must be sym expression.
Does anyone know how to avoid this?