MATLAB Answers

0

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

Asked by sandeep singh on 9 Oct 2018
Latest activity Commented on by sandeep singh on 12 Oct 2018
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.

1 Answer

Answer by ANKUR KUMAR on 9 Oct 2018
 Accepted Answer

  3 Comments

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);
i have attached pesudo code and text to attached and required output please check and do the needful

Sign in to comment.