I am trying to load the data from a table which is located to another file than the location of the script where I want to load it. Is it possible? Thank you in advance for your time.
Best Answer
Sure, just specify the location before the filename, e.g.:
readtable('H:\folder\Table.xlsx')
you can also add the folder to the MATLAB searchpath:
I don't 100% understand the question: .txt is just as .dat or similar an "indicator" that it's a text file (ascii, not yet nothing to do with MATLAB). The load (as you experienced with testfile.vg) is capable of reading "plain" ascii text files. If the text file contains more than just numbers (like header, dates, etc.), then the other functions for reading ascii files come into play (doc iofun gives an overview).
Best Answer