waitbar uifigure the message input argument cannot support the char '_'

I want to use the waitbar uifigure to display some information,the message argument include the char '_',but it cannot display,and it can cause other adjacent char to also display exception. I want to know how to fix this problem?

 Accepted Answer

One way:
HdlWaitBar = waitbar(0,'Hello World A\_B\_C\_D...');
Another way:
str = 'Hello World A_B_C_D...';
str = strrep(str,'_','\_');
HdlWaitBar = waitbar(0,str);

More Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products

Release

R2020b

Asked:

on 6 Jan 2023

Commented:

on 9 Jan 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!