% This code is displaying the value of B but not printing in a file.
% please help me to solve this problem
write = fopen('tempresults.dat','a');
syms T
B = vpa(int(exp(-(65000.0)/(8.34*T)),273.15,573.15))
fprintf(write,'%e',B);
Printable View
% This code is displaying the value of B but not printing in a file.
% please help me to solve this problem
write = fopen('tempresults.dat','a');
syms T
B = vpa(int(exp(-(65000.0)/(8.34*T)),273.15,573.15))
fprintf(write,'%e',B);
Did you try to find out if fopen() succeeds or not? If yes, did you try to find where the file was created? I can suppose it must be somewhere in system32, or maybe next to host app. Ultimately I would suggest to specify a full path to be sure where to look up.