Hi,
I have below sentence and want pring in reverse order;
Input:
'Hello. I. am. Here.'
Output:
Here. am. I Hello.
I use below code, but both does not work.
>> ss = 'Hello. I. am. Here.'
>> fliplr(ss)
ans =
'.ereH .ma .I .olleH'
>> ss
ss =
'Hello. I. am. Here.'
>> reverse(ss)
ans =
'.ereH .ma .I .olleH'
1 Comment
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/500274-how-to-reverse-the-order-of-words-in-string#comment_786054
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/500274-how-to-reverse-the-order-of-words-in-string#comment_786054
Sign in to comment.