If you want the file to have a .txt extension, then simply tell matlab so:
filename1 = fullfile(name_folder_new,'coefficients_m.txt');
Note that a file extension is just a hint to the operating system (and the user) that the file stores a particular type of data. Windows uses the extension to determine which programs to use by default to open the file, but you can open files with any extension with any program as long as the content of the file is in the format expected by the program. Changing the extension of a file does not change what's stored in it.
You could use .ThisIsaTextFile as an extension and still open your text file in notepad (or a better text editor).