How to add zeros to the end of a cell of array
3 ビュー (過去 30 日間)
古いコメントを表示
plz help
I have two arrays like A={'ATG' 'TCG' 'ATC' 'TTC' 'ACC' 'CCC' 'ACC' 'AAC' 'CAG' 'ACC'}; & B= {'T' '0' '0' 'G' 'G'};
In 'A', I have 10 elements(say m) and in 'B', I have 5(say n) elements. I need to add 10-5=5 (m-n) zeros to the end of B.
I used this
B{numel(A)} = '0'
but the result is 'T' '0' '0' 'G' 'G' [] [] [] [] '0'
i wanna the result 'T' '0' '0' 'G' 'G' '0' '0' '0' '0' '0'
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!