uitable row display-problem

5 ビュー (過去 30 日間)
as hz
as hz 2013 年 2 月 6 日
Hi,
I have a strange problem, I did a uitable and concatenate the rows but it displays the data from row 5. Can someone tell me why? and how to display the data from row 1?
Thanks
[EDITED, copied from Answers section]
Hi,
Yes, it is with GUIDE.
The code is:
cData = {AInfo, BInfo, CInfo, DInfo, EInfo};
old_data=get(handles.infoTable,'data')
new_data=[old_data;cData]
set(handles.infoTable, 'data',new_data);
The output is:
old_data =
'' '' '' '' ''
'' '' '' '' ''
'' '' '' '' ''
'' '' '' '' ''
new_data =
'' '' '' '' ''
'' '' '' '' ''
'' '' '' '' ''
'' '' '' '' ''
[1x116 char] [0.9764] [0.3566] [0.1619] [0.5874]
Any idea why the old_data is giving 4 empty rows?
Thx.
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 6 日
Post an example. Are you using a guide?
Jan
Jan 2013 年 2 月 7 日
編集済み: Jan 2013 年 2 月 7 日
Please add all information, which are required to understand the problem, in the original question. Then a reader can get all details by reading the question and not by collecting different informations from comments and answers.
old_data contains empty values, when the uitable contains empty fields only. Currently the posted code does not reveal, why the first row should contain any values.

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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 7 日
Maybe you should initialize in your opening function
set(handles.infoTable, 'data',[]);
  5 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 7 日
I am not seeing set(handles.infoTable, 'data',[]); in your untitled1_OpeningFcn
as hz
as hz 2013 年 2 月 7 日
Thanks a lot. I understand what was the problem.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Identification についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by