Hello everyone, help for consolidation of numbers
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
SAVAS PAPAGIANNIDIS
le 11 Mar 2019
Commenté : SAVAS PAPAGIANNIDIS
le 12 Mar 2019
Hello everyone,
I would like your help in the following :
How can i convert A = [1,2,3,4,5,6......n] to B = [123,456,......n],........ ???
thanks in advance..!!
0 commentaires
Réponse acceptée
Bob Thompson
le 12 Mar 2019
One convoluted way of doing this would be to convert to strings and back.
for i = 1:length(A)/3
B(i) = str2num([num2str(A(3*i-2)),num2str(A(3*i-1)),num2str(A(3*i))]);
end
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!