hi would u plz help me

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

  • It's quite simple:

    c(i)=k
    b=char(c)
  • thank u very much friend

    it works very perfect

    i apperciate all ur help and im very greateful

    my best wishes and regards


  • Thank you! I'm glad I could help!
Sign In or Register to comment.

Howdy, Stranger!

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

Categories