my code wont run. was required to write a code to add charecters an store then in array
1 次查看(过去 30 天)
显示 更早的评论
AccuSumNet({'123456789101112131415161718192021222324252627282930' '123456789101112131415161718192021222324252627282930123456789101112131415161718192021222324252627282930' '12345'});
function x=AccuSumNet(:,n)
y=x-'0';
sum(y);
AccuSumNet(:,n+1);
end
0 个评论
采纳的回答
David Hill
2020-5-11
function x=AccuSumNet(n)
for k=1:length(n)
x(k)=sum(n{k}-'0');
end
end
AccuSumNet({'123456789101112131415161718192021222324252627282930' '123456789101112131415161718192021222324252627282930123456789101112131415161718192021222324252627282930' '12345'});
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!