my code wont run. was required to write a code to add charecters an store then in array

3 次查看(过去 30 天)
AccuSumNet({'123456789101112131415161718192021222324252627282930' '123456789101112131415161718192021222324252627282930123456789101112131415161718192021222324252627282930' '12345'});
function x=AccuSumNet(:,n)
y=x-'0';
sum(y);
AccuSumNet(:,n+1);
end

采纳的回答

David Hill
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 个)

类别

Help CenterFile Exchange 中查找有关 NaNs 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by