Effacer les filtres
Effacer les filtres

changing string variable values

2 vues (au cours des 30 derniers jours)
Neesha
Neesha le 24 Sep 2015
Commenté : Neesha le 24 Sep 2015
Hi All,
I have a struct with two datasets.
Say
myStruct =
myData1 = [124 x 4]
myData2 = [124 x 4]
Those 4 columns in myData1/2 are myName , myNumber, mySubIndex , summaryData [1 x 60]
All unique names in myName are
restEast restWest restNorth restSouth
I want to change those names, for example all 'restEast' should be changed to 'ownedBySmith'
I can probably do strcmp for restEast and create subset, add another column with 'ownedBySmith' and then delete the column which contained value restEast. I can do that for each name and then vertcat in the end. This is going to be very tedious. Is there a better way to do it in place instead of separating each set by value of 'myName'.
  2 commentaires
per isakson
per isakson le 24 Sep 2015
"[124x4]" &nbsp are that cell arrays?
Neesha
Neesha le 24 Sep 2015
Dataset

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Shifting and Sorting Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by