Problem 1860. Remove TeX from string

Matlab’s TeX support in figure windows is great for displaying information in a visually appealing way. However, many of the TeX elements just get in the way when displaying a label string in the command window and lead to lots of additional gibberish if you want to create a valid variable name from the TeX string using genvarname.

Given the TeX string as an input, return a string that contains only the plain text of what would be displayed in a figure window by title, xlabel, etc.

Retain special characters, e.g., ‘\beta’ becomes ‘beta’.

Cell array inputs should return multi-line strings.

Solution Stats

63.64% Correct | 36.36% Incorrect
Last solution submitted on Sep 10, 2016
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Join the 15-year community celebration.

Play games and win prizes!

Learn more