"TI is repmat"
What on earth does that mean?
"How to fix?"
Don't use cell2mat on a non-cell object.
Whatever it is, which we have no way in the world of knowing, TI(q).Si is NOT a cell.
Show us what
whos TI
returns and mayhaps we can tell you something.
Syntax looks like it is a struct, maybe.