Big thanks to Gilles-Philippe.
My earlier problem was I forgot the function for c1, instead using the index.
Everything was off.
The problem I have now is that using a function of c1 instead of the index, my values are all off because Matlab starts arrays at 1, not 0. This isn’t a theoretical problem, but it is nitpicky.