How to extract the first four and last four digits of all numbers of an array where each number is of 12 digits?
Ältere Kommentare anzeigen
I have an array of over 200,000 numbers. Each of these numbers is of 12 digits. I want to extract and form another array with: (1) the first four digits of the original array, (2) the last four digits of the original array. How can it be done?
For example if one of the numbers of the array is 123456789012, then the output to (1) should be "1234" and output to (2) should be "9012".
2 Kommentare
DGM
am 24 Mär. 2021
Is this a strictly numeric array or a cell array of strings/chars imported from a file?
Abhishek Chakraborty
am 24 Mär. 2021
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!