How to add zeros to the end of a cell of array
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
eman baky
am 16 Sep. 2021
Kommentiert: eman baky
am 17 Sep. 2021
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 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!