File extension not recognized

21 Ansichten (letzte 30 Tage)
Natalie Cannon
Natalie Cannon am 28 Sep. 2020
Beantwortet: Walter Roberson am 28 Sep. 2020
I'm working with a file that has the extension '.ep'. The file opens and runs like a '.txt' file outside of matlab but when I try to have my code open it inside the program it is not able to be opened.
Matlab suggested using detectImportOptions, which I tried:
opts= detectImportOptions('*.ep*','FileType','text');
But am still having the same errors thrown back at me. Any guidance on how to work around this?

Antworten (1)

Walter Roberson
Walter Roberson am 28 Sep. 2020
You need to apply detectImportOptions onto a particular filename, not to a wildcard file extension. You cannot extend detectImportOptions to tell it that from now on treat .ep files as text files. Instead, you need to detect import options for some particular file, after which you can pass the opts structure when you readtable() or readmatrix() or readcell() a particular .ep file.

Community Treasure Hunt

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

Start Hunting!

Translated by