Using Latex and symbols e.g. \omega
6 次查看(过去 30 天)
显示 更早的评论
set(0, 'defaultTextInterpreter', 'latex');
sgtitle(["ECE 202 Exercise M7: Current, voltage, and power absorbed";...
sprintf("by a charging Inductor$(V_0 = %gV, R = %g\omega, L = %gmH)$",...
V0, R, L)],'Fontsize', 18)
This is my code. I set latex interpreter at the beginning of the code, because I need to use it multiple times. I am making a title for subplots. My problem is I need to "Add more $ to the title, so that only V_0, R, and L are treated as variables. ". When I try to do this all of the code is displayed, nothing is displayed correctly.
0 个评论
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assumptions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!