Info

この質問は閉じられています。 編集または回答するには再度開いてください。

moving a value under a certain value

1 回表示 (過去 30 日間)
Erik Verdijk
Erik Verdijk 2018 年 4 月 7 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
Walter Roberson
Walter Roberson 2018 年 4 月 9 日
zip the file and attach the zip
Erik Verdijk
Erik Verdijk 2018 年 4 月 9 日

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 4 月 9 日
mask = strcmp(raw(:,2), 'efg');
raw(mask, 3) = raw(mask, 4);

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by