import data into uitable

1 回表示 (過去 30 日間)
Radoslav Vandzura
Radoslav Vandzura 2015 年 10 月 7 日
コメント済み: TastyPastry 2015 年 10 月 9 日
I would like to ask you how shout I import data into uitable,mixed data - numbers and string? I have created uitable in guide. Here is part of my code:
global strFilename [num,txt,raw] = xlsread(strFilename) set(handles.edit3, 'data', num); -After that only numbers appear in uitable. set(handles.edit3, 'data', txt); -After that only words appear in uitable.
How can I resolve it?

採用された回答

TastyPastry
TastyPastry 2015 年 10 月 7 日
set(handles.edit3,'data',raw); should resolve the issue. uitable accepts either numeric arrays or cell arrays if you want mixed data types. The reason you're seeing only words appear when you use txt as your data variable is because the second output of xlsread ignores numbers.
  3 件のコメント
Radoslav Vandzura
Radoslav Vandzura 2015 年 10 月 7 日
Can I ask you yet, after importing data into uitable I need to analyze data. How can i get access to these data?
TastyPastry
TastyPastry 2015 年 10 月 9 日
You can use calls to guidata() to save and retrieve the handles. Then, if you're running 2014b+ you can just use dot notation handles.edit3.data, or you'll need get(handles.edit3,'data').

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by