MATLAB Write result to txt file

  • Context: MATLAB 
  • Thread starter Thread starter NoobixCube
  • Start date Start date
  • Tags Tags
    File Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 78K views
NoobixCube
Messages
154
Reaction score
0
Hey All,
Quick question hope someone can help.
Does anyone know how to write the result from a program in MATLAB to a text file ?
I have googled this question to no avail.
:confused:
 
Physics news on Phys.org
Cheers siddharth I will have a gander.
 
you can search google by the keyword : MATLAB file io
then ,you will get the result you wanted
 
i want to save my output in text file. i use for loop so it produce n outputs.i want to save all the output in my single file
 
sivagami said:
i want to save my output in text file. i use for loop so it produce n outputs.i want to save all the output in my single file

Welcome to PhysicsForums!

If your outputs are numbers, concatenate your numbers together into an array and then save using the save command (type 'help save' to figure out how to get ASCII output). Otherwise, you'll need to use fprintf.