Cody

ren yi xin ren

1819
Rank
2
Badges
670
Score
1 – 50 of 74

ren yi xin ren received Commenter badge for Problem 41. Cell joiner

on 11 Jan 2020

ren yi xin ren submitted a Comment to Problem 41. Cell joiner

function out_str=cellstr_joiner(in_cell, delim) L=strlength(in_cell); n=length(L); summ=L(1); m=length(delim); for k=2:n-1 L(k)=summ+L(k); summ=L(k); end L(end)=[]; out_str=cell2mat(in_cell); for i=1:length(L) out_str=strcat(out_str(1:L(i)),abs(delim),out_str(L(i)+1:end)); L=L+m; end end who can tell me why my code is wrong.thank you

on 11 Jan 2020

1 – 50 of 74