Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
reversing string

Subject: reversing string

From: Ramy

Date: 20 Sep, 2004 02:42:57

Message: 1 of 5

hi

How can i reverse a string.
for ex.
if a='Matlab'

i want to reverse this word to 'baltaM'

Ramy

Subject: reversing string

From: saurabh khare

Date: 20 Sep, 2004 02:52:13

Message: 2 of 5

use //wrev(a)//

ramy wrote:
>
>
> hi
>
> How can i reverse a string.
> for ex.
> if a='Matlab'
>
> i want to reverse this word to 'baltaM'
>
> Ramy

Subject: reversing string

From: QinYan

Date: 20 Sep, 2004 02:53:38

Message: 3 of 5

ramy wrote:
>
>
> hi
>
> How can i reverse a string.
> for ex.
> if a='Matlab'
>
> i want to reverse this word to 'baltaM'
>
> Ramy

> Hi ramy
> You may do it using such below codes
>
> a='Matlab';
> a= fliplr(a);

Subject: reversing string

From: Ralph

Date: 20 Sep, 2004 03:55:50

Message: 4 of 5

Or without the help of any other functions:

A='Matlab'
B=A(end:-1:1)

Subject: reversing string

From: Michael Wild

Date: 20 Sep, 2004 05:16:32

Message: 5 of 5

Or use fliplr

Michael

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us