file write problem

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

The made a below script.

When I see the read3.txt file it has different show.

 

['notepad program']

It doesn't have a line change.

image.png.9f76f7185a7af589a1d331d950e12534.png

 

['notepad++ program']

It has a line change

image.png.4b60b7ddadc38fa01f7da81b55963541.png

 

 

How can I make a read3.txt file to be read same as 'notepad++ program'   at 'notepad program'.

 

 

file = 'read3.txt';
fid = fopen(file, 'w');
AA=[1,2;3,4;5,6];


for i=1:3
fprintf(fid,'%f %f \n', AA(i,:)); 
end


fclose(fid);

 

 

 

Find more posts tagged with