Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

moving a value under a certain value

1 vue (au cours des 30 derniers jours)
Erik Verdijk
Erik Verdijk le 7 Avr 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
A have a structure with a cell aray called textdata. The cells in column 2 are filled with the words abc or efg. In the case a cell of this column contains efg, I like to replace the value from column 3 (same row) with the value of column 4. How can I do that? Thank you
  8 commentaires
Walter Roberson
Walter Roberson le 9 Avr 2018
zip the file and attach the zip
Erik Verdijk
Erik Verdijk le 9 Avr 2018

Réponses (1)

Walter Roberson
Walter Roberson le 9 Avr 2018
mask = strcmp(raw(:,2), 'efg');
raw(mask, 3) = raw(mask, 4);

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by