[TOC]

strcat

Concatenating character arrays

Usage

strcat(s1, s2, ..., sn)

Difference With MATLAB

Examples

Input
a = 'I love 🚙 '
b = 'and you!'
strcat(a,b)
Output
ans = 
I love 🚙 and you!
Input
a = 'I love ';
b = 'and you!';
c = ['🚙 ';'🚚 ']; 
strcat(a,c,b)
Output
ans = 
I love 🚙 and you!
I love 🚚 and you!
Input
% Array sizes
m1=3; n1=5;
m2=3; n2=6;
% Double arrays
dbl1=randi(100,m1,n1)
dbl2=randi(100,m2,n2)
% The double arrays are converted to characters
% and then catenated.
cat=strcat(dbl1, dbl2)
Output
dbl1 = 
 52.000   40.000   57.000   33.000   29.000
 21.000   66.000   6.0000   67.000   38.000
 26.000   11.000   92.000   43.000   39.000

dbl2 = 
 45.000   83.000   71.000   89.000   9.0000   99.000
 15.000   74.000   99.000   87.000   98.000   2.0000
 7.0000   32.000   75.000   59.000   18.000   61.000

cat = 
4(9!U-SGYUc
UBUC&UJcWbU
UU\+'U K;U=