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

답변 (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