how to do zero padding in middle
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I have some text files.. All text file contains two columns. both of 480 rows. But some text files have some rows missing.. In one of them after 63rd row directly there is 86th row.. So, total rows get reduced to 450. Now i want to convert this rows in again 480rows by zero padding from 64th to 85th.. So, how to do..? This text file is attached here.. http://www.fileconvoy.com/dfl.php?id=g4a8afb397a4e11ed999171111e1b74b570928a6b1
Risposte (1)
Walter Roberson
il 21 Nov 2012
Consider using textscan() with the MissingValue option set to 0
5 Commenti
Walter Roberson
il 21 Nov 2012
If the values can go at the end then if M is what you read the data in to,
M(end+1:end+length(missingvalues), 1) = missingvalues;
and then write the file out in an appropriate format.
Vedere anche
Categorie
Scopri di più su Text Data Preparation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!