-
1 Comment
Abdeslam Aannaque
on 19 Mar 2017
My solution is:
function out_str = cellstr_joiner(in_cell, delim)
y=in_cell;
y(find(cellfun(@isempty,cellfun(@strtrim,y,'UniformOutput',false))))=[];
out_str = strjoin(y);
out_str(find(out_str==' '))=delim;
end
On Matlab all tests pass but on the cody website the second test fail!
Suggested Problems
-
Make the vector [1 2 3 4 5 6 7 8 9 10]
50223 Solvers
-
1268 Solvers
-
792 Solvers
-
Arrange vector in ascending order
785 Solvers
-
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
942 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!