http://kr.mathworks.com/help/matlab/ref/strrep.html
strrep
Syntax
modifiedStr
= strrep(origStr
, oldSubstr
, newSubstr
)
Description
replaces all occurrences of the string modifiedStr
= strrep(origStr
, oldSubstr
, newSubstr
)oldSubstr
within string origStr
with the string newSubstr
.
Examples
Replace text in a character array:
MATLAB® returns:
Replace text in a cell array:
MATLAB returns:
Replace text in a cell array with values in a second cell array:
MATLAB returns:
Compare the use of strrep
and regexprep
to replace a string with a repeated pattern:
MATLAB returns:
More About
'연구관련 > 프로그래밍' 카테고리의 다른 글
OpenCV 3.0 + Visual Studio 2013 으로 Compile (20) | 2015.09.18 |
---|---|
[MATLAB] cell 관련 이것저것 (2) - 계층 구조 cell (0) | 2015.08.20 |
[MATLAB] 여러개의 cell, 하나로 합치기 (계층/비계층 구조 cell) (1) | 2015.08.20 |
[MATLAB] textscan 사용 시 header 부분 혹은 특정 부분 skip하여 읽기 (0) | 2015.08.20 |
[MATLAB] cell 관련 이것저것 (1) - 비계층 구조 cell (0) | 2015.08.18 |