MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

A = magic(3)


A =


8 1 6
3 5 7
4 9 2


regexprep('The columns of matrix _nam are _val', ...
{'_nam', '_val'}, ...
{'A', '${sprintf(''%d%d%d '', A)}'})


ans =


'The columns of matrix A are 834 159 672'


See Also


regexp | regexpi | regexprep


More About



  • “Regular Expressions” on page 2-41


See Also
Free download pdf