Hello,
I have created a little code that opens 1×1 table(can not change the form in the .txt file) and stores a particular value. However the output is adding on the white spaces and [km]. How do I get rid of that? I just want the number to appear.
Here is my code:
filename = ('C:\Users\creid\Desktop\STK_doc.txt')opt = detectImportOptions(filename)A = readtable(filename, opt)X = A(38,2)
and here is the output:
'-712.419553 [km]'
I have also uploaded a snippet of the txt file
Best Answer