Why does UIIMPORT not work correctly if I specify an output argument?

6 views (last 30 days)
If I use UIIMPORT without specifying an output argument, it works as expected. If I specify an output argument; however, I get the following :
>> s=uiimport('test.txt')
Warning: Index exceeds matrix dimensions.
> In D:\Applications\MATLAB6p5\toolbox\matlab\uitools\uiimport.p (doFinish) at line 541
In D:\Applications\MATLAB6p5\toolbox\matlab\uitools\uiimport.p at line 107
s =
[]
In this case 'test.txt' is a very simple CSV file.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
As a workaround, please follow these steps:
1) Delete $MATLAB/toolbox/matlab/uitools/uiimport.p, where $MATLAB is your MATLAB root directory.
2) Edit the $MATLAB/toolbox/matlab/uitools/uiimport.m file.
3) Change line 493 of the uiimport.m file from
out.(vname) = ad.datastruct(names{i});
to
out.(vname) = ad.datastruct.(names{i});
by adding a period between "datastruct" and "(names{i})";
4) Exit and restart MATLAB.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!