Hi David,
It seems you're trying to mix LaTeX text and math modes in MATLAB but aren't getting the desired output. To fix this, you can use the “\mathrm” command within the math mode.
This command renders text in an upright (roman) font within a math expression, ensuring that non-mathematical symbols are styled correctly.
Here is a sample code, which prints “$\theta_{Co}$” same as your desired output ():
figure;
% Plotting random data
plot(1:10, rand(1, 10));
title('$\theta$', 'Interpreter', 'latex');
xlabel('x');
ylabel('y');
% Add a text annotation with LaTeX formatting
text(5, 0.5, '$\theta_{\mathrm{Co}}$', 'Interpreter', 'latex');
You can refer to the following MathWorks Documentation link to learn more about using LaTeX in MATLAB: