MATLAB Answers

0

Why can't I define text strings using pipes in MATLAB R2014b?

Why can't I define text strings using pipes in MATLAB R2014b?

Products


Release

R2014b

1 Answer

Answer by MathWorks Support Team on 7 Oct 2014
 Accepted Answer

Starting in MATLAB R2014b, do not use the vertical slash character, |, to separate text strings. MATLAB interprets the vertical slash character literally and not as a delimiter. For example, this code displays the entire set of strings at each position.
text([.1 .3 .7],[.5 .7 .9],'text1|text2|text3');
To define multiple strings, use a cell array.  
text([.1 .3 .7],[.5 .7 .9],{'text1','text2','text3'})

  0 Comments

Sign in to comment.