i want to save f into file .txt. Example name of file is a.txt with it's content: sin(t)
how to do that. Help and guide me.
Tk a lot.
Best Answer
fid = fopen('a.txt', 'wt');
fprintf(fid, '%s\n', char(f));
fclose(fid);
Note: char() of a symbolic expression doesnot generally result in a string that can be evaluated by MATLAB. char() of a symbolic expression is really only suitable for entering the expression back in to the symbolic toolbox.
Best Answer