How to make a list out of an array with cells containing strings and give them new values from another list built on the same principle?

2 views (last 30 days)
Hi!
I have this problem I need to rename some values in an array manually, the new values already exist in an other array, therefore I wonder if it is possible how to make a list of the first values and then rename them by picking values from the other array.
I have an idea of using listdlg to choose wich value to swap with the other value, is this possible and if so does anyone have a good way of doing this?`
Thanks David

Accepted Answer

Image Analyst
Image Analyst on 4 Jul 2016
Yes, using listdlg() to let the user select the strings to change is a good idea. Have you tried it?
  2 Comments
studentdavid
studentdavid on 5 Jul 2016
I have tried it might need some more testing because I haven't really got it to work. But if you think this is a good idea it might be the way. Do you have any input on how the code should be written?
Thank you for the quick answer!

Sign in to comment.

More Answers (1)

Thorsten
Thorsten on 4 Jul 2016
A = {'a' 'b' 'c'}; B = {'d' 'e' 'f'}
A{2} = B{3}

Categories

Find more on Shifting and Sorting Matrices in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!