MATLAB: Sprintf with latex problem

latexsprintftitle

I just cannot figure out what the problem is with this line, please help. I get this warning sometimes:
Warning: Error updating Text.
Character vector must have valid interpreter syntax:
$ρ_t = 0.26ρ_f, θ_0 = 90°$
Regardless, the subscripts never take. Here is the problematic line:
title(sprintf('$%c_t=%.2f%c_f,%c_0=%2.0f%c$',961,idens,961,952,iang*180/pi,176),'Interpreter','latex');

Best Answer

latex cannot have any characters with position greater than 255. That is violated by your 961 (rho) and 952 (theta).
Use \rho and \theta