how to add zero padding to text file to make 250x4
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
I want to add zeros to make my data eqaully balance with 250 rows and 4 columns. can anyone help?
1 comentario
Respuestas (1)
  Sulaymon Eshkabilov
      
 el 14 de Jul. de 2021
        
      Editada: Sulaymon Eshkabilov
      
 el 14 de Jul. de 2021
  
      X = load("Test0.txt");    % Original data file
x1 = zeros(250,4);        % Zeros 250-by-4   
XX = [x1;X];              % All data augmented
writematrix(XX,'Test_New.txt','Delimiter','tab') % Written a new data file in *.txt
Ver también
Categorías
				Más información sobre Standard File Formats en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


