How do I assign a full word to a single array position?
Show older comments
I have an user created array of real integers, I am trying to have a resulting array that shows each position as "odd" or "even". My issue is that each character of a word has its own position in an array. How do you make matlab accept an entire word as just one character?
Accepted Answer
More Answers (1)
Walter Roberson
on 19 Oct 2016
0 votes
As of R2016b, you can use strings() to create a 2 dimension string array, which can then store 'odd' or 'even' at each position.
For any previous version, you need to use a cell array of strings.
Categories
Find more on Characters and Strings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!