This question is closed. Reopen it to edit or answer.

How to export a txt file

1 view (last 30 days)
Pouyan Msgn
Pouyan Msgn on 7 May 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
I have a txt file here but there is a problem in the X-axis and I have to reduce it by the value 1.4
I did it in Matlab but I failed to save it as new txt file
Here is my attempt:
clear all
X=D398(:,1)-(1.4); Y=D398(:,2);
A=[X Y];
fileID = fopen('NewFile.txt','w');
fprintf(fileID,'%6.2f %12.8f\n',A);
The Y axis in the NewFile is not the same as before!
Pouyan Msgn
Pouyan Msgn on 7 May 2020
Hi thank you!

Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!