MATLAB Answers

Le Huy

I need a help when importing data by using uiimport!

Asked by Le Huy
on 18 Apr 2014
Latest activity Edited by Le Huy
on 19 Apr 2014

I imported data from file.txt (the file.txt contain number as matrix) by using uiimport, but after importing data, i dont know how to call the number from the data. my code is:


%then i chose the file in the Import Wizard

A =

    NewTextDocument: [3x2 double]

I mean: how to show and use that matrix?


Log in to comment.


No products are associated with this question.

1 Answer

Answer by Mischa Kim
on 18 Apr 2014
Edited by Mischa Kim
on 18 Apr 2014
 Accepted Answer

Le Huy, the data is accessible through


or, if you want to access individual elements, e.g.,

 A.NewTextDocument(2,1)  % get element in row 2, column 1

  1 Comment

OK I got it! thank you so much Mischa Kim! one more problem: how can I add data to each cell of my uitable individually! i mean: after each calculation in my project (in my case: the calculation is in the code For i= : ), i want to add each result to the cell that i plan to, and the result may be a number or a string. How is the code i can use? I 'm beginner so I hope your welcome!thank you!

Log in to comment.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!