I am trying to learn matlab. How can I replace this: 1×4 cell array
{'A'} {'B4'} {'G6'} {'D5'}
to this
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'