Azzera filtri
Azzera filtri

I am having trouble importing space delimited data from a text file.

2 visualizzazioni (ultimi 30 giorni)
I have a relatively small text file with just two columns and it will not import. I tried using:
filename = 'unpolished_100x';
delimiterIn = ' ';
headerlinesIn = 0;
A = importdata(filename,delimiterIn,headerlinesIn);
and:
X = importdata('-pastespecial')
and I get this message:
Undefined function 'importdata' for input arguments of type 'char'.
Every time I hit "Import data" I receive this message:
com.mathworks.jmi.MatlabException: Undefined function 'uiimport' for input arguments of type 'char'.
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:265)
at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
at com.mathworks.jmi.Matlab.mtFeval(Matlab.java:1619)
at com.mathworks.mlwidgets.workspace.WorkspaceCommands$1.runOnMatlabThread(WorkspaceCommands.java:1246)
at com.mathworks.mlwidgets.workspace.WorkspaceCommands$1.runOnMatlabThread(WorkspaceCommands.java:1241)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79)
at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:440)|||||||
  13 Commenti
Emily Lubicich
Emily Lubicich il 20 Ott 2016
That data command returns: Undefined function 'dlmread' for input arguments of type 'char'.
I have restarted matlab but not the computer. I'm leaving for the day so when I start it up in the morning I will give it a try. If it doesn't work then I will contact IT on campus. They can reinstall it. Thank you both for the help!
dpb
dpb il 20 Ott 2016
That sounds as though the IOFUN directory that holds all i/o routines is either missing or not in the MATLABPATH as was beginning to suspect. Probably reinstallation is going to be the only cure, but what does
path
return?

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 19 Ott 2016
Try, in this order:
rehash toolboxcache
and
restoredefaultpath
and if neither of those helps, then reinstall MATLAB.

Categorie

Scopri di più su Large Files and Big Data in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by