App designer : Unable to read imported data to table of 7 columns

1 回表示 (過去 30 日間)
Ramesh Bala
Ramesh Bala 2021 年 9 月 6 日
コメント済み: Ramesh Bala 2021 年 9 月 7 日
I tried to import a text file and then show it in a table of 101 rows x 7 columns ( data is like that) using push button in App desinger. A is global .Disp (A) works so the data is stored.But how shall I pull those data into the table ?
Thanks in advance
function Importfile_2ButtonPushed(app, event)
file = uigetfile('*.txt');
app.A = load(file);
A = app.A;
end
% Button pushed function: Text2TableButton
function Text2TableButtonPushed(app, event)
disp(app.A); % this works
app.Text2TableButton.Data = app.A;
end
  2 件のコメント
Thomas Fournier
Thomas Fournier 2021 年 9 月 7 日
Isn't it just a mix up in the name of your table ? It's weird that you have a table named Text2TableButton..Initially it should have been called app.UITable
Writing
app."tableName".Data=data
should work
Ramesh Bala
Ramesh Bala 2021 年 9 月 7 日
Dear Thomas,
Thank you for your valuable answer.
Yes you're right it was named as such and I forgot to figure it out.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by