MATLAB Answers

Extension change from .txt to .Z14

1 view (last 30 days)
Sergio Vez
Sergio Vez on 29 Oct 2019
Commented: Sergio Vez on 29 Oct 2019
Good morning,
I need to edit a file with a extension ".Z14" in MATLAB.
  • First thing I did was a programm that opens a ".txt" file and saves a ".txt" file with the changes I had to make. (In order to do so, I first had to open the ".Z14" in my computer and save it as a ".txt" file)
  • The problem is that I get (save) a file in ".txt" but I need it in ".Z14".
  • If I just change the program and read a ".Z14" file and save a ".Z14" file, the programm doesn't work (I does not make the changes I need).
How could I fix it?
Thanks in advance!
Sergio

  0 Comments

Sign in to comment.

Accepted Answer

galaxy
galaxy on 29 Oct 2019
You can copy file as following
file1='A.txt'
file2=strrep(file1,'.txt','.Z14')
copyfile(file1,file2)

  6 Comments

Show 3 older comments
galaxy
galaxy on 29 Oct 2019
OK.
In this case, you can use following code as before of your code for change Z14 to txt file
file1='ENTRADA.Z14'
file2=strrep(file1,'.Z14','.txt')
copyfile(file1,file2)
after that, you read ENTRADA.txt file. In the end, you also to save from txt file to Z14.
I think you can use other way for read Z14 file directly, but I do not know it's format, so I not sure
Sergio Vez
Sergio Vez on 29 Oct 2019
Thank you. Now the problem is that when I do that in MATLAB, the .txt file appears like this
C a l c u l a t i o n . u p d a t e d
Intead of
Calculation.updated (as it was when I created the .txt outside MATLAB)
¿?
Sergio Vez
Sergio Vez on 29 Oct 2019
Can you help me please?

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Products