Hi All,
I have the following code
str = cellstr(char('This','Orthis'));x = round(rand(10,1))+1;output = [repmat('some text ',10,1) str{x}]
I want the output to look like:
output = some text OrThissome text Thissome text Thisetc..
where the last word in each row is selected by str{x}. This is not working, as the str{x} part of the concatenation is not generating the appropriate array. Any suggestions? Thanks!
Best Answer