import data into a txt file from matlab
    4 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
I want to import data into txt file. I have written the prog.
m=[1 2 3 4 5 6 6 6 7 8 9] fid = fopen('data.txt', 'w'); % data.txt is the txt file where i have to import fprintf(fid, '%d', m); fclose(fid);
But the result shows none....Please help
0 Commenti
Risposta accettata
  Azzi Abdelmalek
      
      
 il 13 Set 2012
        
      Modificato: Azzi Abdelmalek
      
      
 il 13 Set 2012
  
      you mean export data to text file
 m=[1 2 3 4 5 6 6 6 7 8 9]
 fid = fopen('data.txt', 'w');
 fprintf(fid, '%d', m); 
 fclose(fid);
works fine
or
 dlmwrite('file.txt',m,'delimiter',' ')
0 Commenti
Più risposte (0)
Vedere anche
Categorie
				Scopri di più su Data Import and Analysis 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!