MATLAB Answers

Creating a report file in txt format and merging it with created text file

3 views (last 30 days)
Hello All, I have to create a text report file of my results, but i have made text file with instructions, this has to be merged or appended during the report generation i have to make user defined function using which i can use it for my further application and project Thanks in Advance

  0 Comments

Sign in to comment.

Accepted Answer

ANKUR KUMAR
ANKUR KUMAR on 9 Oct 2018

  3 Comments

ANKUR KUMAR
ANKUR KUMAR on 9 Oct 2018
fileID = fopen('qwerty.txt','w');
fmt = '%5d %5d %5d %5d\n';
fprintf(fileID,fmt, magic(4));
fclose(fileID);
fileID = fopen('qwerty.txt','a');
fprintf(fileID,'%s','succesfully append in text file');
fclose(fileID);
sandeep singh
sandeep singh on 9 Oct 2018
i have attached pesudo code and text to attached and required output please check and do the needful

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!