Monday, October 24, 2022

MATLAB String Functions

>> x="abcdefgh"

x =

"abcdefgh"

>> y=replace(x,"cd","wxyz")

y =

"abwxyzefgh"

>> z=strrep(x,"cd","wxyz")

z =

"abwxyzefgh"

>>