hi would u plz help me - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

hi would u plz help me

ahmed_sehahmed_seh Posts: 25Member
hello guys
how r u everyone? wish u r fine and feel ok

be4 writing my question lets take this example

a=double('david')
answer will be like this

a =

100 97 118 105 100
now use sort function like this

[k,i]=sort(a)
the answer will be like this

k =

97 100 100 105 118


i =

2 1 5 4 3

my problem or question is:

how can i change the position of letter again to get word 'david' after sorting cuz b=char(k) i will get b= addiv
i want to get word 'david' back......

could u plz tell how to do it?? i tried many ways but i couldnt so plz guys help me by showing the right function or code and i will very greateful

with my best regards and wishes

Comments

Sign In or Register to comment.