I am trying to learn MATLAB. How can I convert this cell arraay:
1×4 cell array
{'A'} {'B4'} {'G6'} {'D5'}
to this string:
A -> B4 -> G6 -> D5
CodePudding user response:
You can use strjoin
to merge them into one string, with a delimeter ->
c = {'A', 'B4', 'G6', 'D5'};
str = strjoin( c, ' -> ' );
disp( str );
% 'A -> B4 -> G6 -> D5'