I need ur help and ur comments


(ahmed_seh) #1

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]


(المهندس سعود) #2

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


(المهندس سعود) #3

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


(المهندس سعود) #4

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


(عبد العزيز غالب) #5

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

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


(ahmed_seh) #6

thank u very much guys.

code works very perfect
i apperciate ur helps and ur attention


(المهندس سعود) #7

youn are welcome