MATLAB Answers

File extension not recognized

12 views (last 30 days)
Natalie Cannon
Natalie Cannon on 28 Sep 2020 at 21:21
Answered: Walter Roberson on 28 Sep 2020 at 21:45
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?

  0 Comments

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 28 Sep 2020 at 21:45
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.

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!