I need ur help and ur comments

hi guys, how r u i hope every one is fine and ok

i wrote a program and i used sort function, now let’s see an example

a=‘hamad’

the answer will be a = hamad

now to use sort function, i wrote

[LEFT][k,i]=sort(a)
the answer will be i = aadhm

my question is how can i reform the letters again to get word hamad again??

i mean what is the function or code i can use to get my answer??

plz guys if dont understand my problem or question let me know

waiting for ur response and reply

thank u very much with my best regards

[/left]

ولا يهمك محلولة باذن الله


clc
clear
a='ahmad';
x=1:5;
ax=[a' x'];
sortrows(ax)
sortrows(ax,[2)]

ان شاء الله فهمته

]السلام عليكم
وهذا حل اخر

clc
clear
a='hamad';
[k,i]=sort(a)
[j,i]=sort(a,1)

thank u very much guys.

code works very perfect
i apperciate ur helps and ur attention

youn are welcome