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?

1 次查看(过去 30 天)
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

采纳的回答

Image Analyst
Image Analyst 2016-7-4
Yes, using listdlg() to let the user select the strings to change is a good idea. Have you tried it?
  2 个评论
studentdavid
studentdavid 2016-7-5
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!

请先登录,再进行评论。

更多回答(1 个)

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

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by