How to write data of a variable generated in a loop in a text file such that it is written after every row or appended?
    4 views (last 30 days)
  
       Show older comments
    
How to write data of a variable generated in a loop in a text file such that it is written after every row or appended?
Say the variable is 
f = mean (T)
I want the value of T to be written in a text file such that it is appended for say 50 iterations.
Please help me. 
Thank you
0 Comments
Answers (1)
  KALYAN ACHARJYA
      
      
 on 13 May 2023
        
      Edited: KALYAN ACHARJYA
      
      
 on 13 May 2023
  
      diary my_data
loop
%diaplay the data in command window 
diary off
Please see details diary function
HTH
See Also
Categories
				Find more on Loops and Conditional Statements in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
