Rotate Individual Letters in a String
Show older comments
Hello! I wonder if there is a way to have the word SINE rotated 90% counter-clockwise and each of the letters 90% clockwise so that the letters stand normal on oneanother like:
E N I S
Thanks!
Accepted Answer
More Answers (3)
Dima
on 23 Jan 2012
Dima
on 23 Jan 2012
4 Comments
Walter Roberson
on 23 Jan 2012
Your S1 assignment is the same as
S1 = 'SIN' .';
(No E because you did not include t4 in your char() call)
"help text" is more clear on the reason you are getting the error:
"If 'string' is an array the same number of rows as the
length of X and Y, TEXT marks each point with the corresponding row of the 'string' array."
Your array did not have the same number of rows as the length of x and y as you only passed one x and y each probably.
You will have to position the characters individually; text() does not have a mechanism to automatically position the characters in the manner you would like.
Dima
on 23 Jan 2012
Walter Roberson
on 23 Jan 2012
char() with multiple single-character arguments turns out to do vertical cat anyhow.
Dima
on 24 Jan 2012
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!