Matlab: The underline character in the title input string will be displayed as a subscript, how to deal with it?

tags: Matlab

When drawing in Matlab, I found that if the string in the title function contains an underscore, the underscore will be displayed as a subscript. For example, title (‘example_1’) will appear as follows:
title
This is because in Matlab, the title function will interpret the input string in the format of ‘tex’ by default, the underscore will become a subscript, and the "^" symbol will become a superscript. In addition, you can also use the escape symbol "\" to represent some special symbols, such as "\ alpha" can represent the Greek letter α \alpha
For example, enter title (’\ alpha ^ 2 + \ beta_1’), and the following display will appear:

The attribute that affects the effect of the output string is 'Interpreter'. This attribute has three values ​​that can be set, namely 'tex', 'latex' and 'none', the default is 'tex', Will interpret the string in tex format and then output the text. If we need to input text output according to the string, set the attribute to ‘none’, for example, title (’\ alpha ^ 2 + \ beta_1’, ‘Interpreter’, ‘none’) will be displayed as follows:
interpreter none
More detailed information can be found on the MathWorks official website.

Intelligent Recommendation

C # string intercept, look up a character subscript

Substring (int); / / // intercepted from the subscript number Substring (int, int); // begins with the number of subscripts, intercepting the last few bits. Str.Indexof (",") // Which of the...

How to make an underline, but the input text will not grow automatically

Problem: When setting the underline, as the text increases, the underline extends and there is a misalignment, as shown below Solution: Make the table and delete the unnecessary borders. The effect I ...

How to deal with the escape character in sparksql

Process the iris.txt data set in spark, some of the processed data are as follows: But there is an error when using sparksql to find the data. The cause of the error should be the matched character &q...

More Recommendation

How to deal with the newline character "↵" in html

How to deal with the newline character #"↵" in html Demand background Request back the field value via ajax, the character is of type String and contains a newline character↵ , T...

What is nan? How to deal with - Matlab

NaN (Not a Number) Nan (not a number) When you handle different, multiple diverse data, often touch NAN, NAN is 0/0 or an imported a string as a value. It may also be endless or when you insert a numb...

cin single character input details of the deal

cin.get (ch) function reads any character (including the null character, line breaks, tabs, etc.) inside from the input stream, which is equivalent to the following operation. cout.put (ch) and cin.ge...

How to deal with the babel configuration not being displayed in react

How to deal with the babel configuration not being displayed in react In order to import only the required components, instead of manually importing the styles, the styles are automatically imported o...

MATLAB character and string pits

It is necessary to distinguish between double quotes and single quotes in MATLAB, which confuses me “ ”Representative string ‘ ’Representative character example...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top