Finding a character in a string in an array of cells
Show older comments
Is it possible to directly take an n_th character of an array, which is located in an array of cells? Example:
>> G = {'1010101', '0010101', '0010101'} % an array of cells with strings in each cells
Now, I would like to access the first string and get the first character (in my case a bit). Till now I would assig a value of the cell to a variable x and then look into the first character, e.g:
x = G{1};
x(1)
Which is kind of annoying. Is it possible to get the character value without reassigning it? Like in Mathematica with double brackets.
Accepted Answer
More Answers (1)
Categories
Find more on Numeric Types 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!