How to create an array with size specified in "Edit Text" field

I would like to put data into the Edit Text fields: Number of tasks and Cycle time
and pressing ENTER DATA button creating a table (Number of tasks, Number of tasks)
Later on I would like to put some data into this table and using ENTER ARRAY button enter it into the workspace.
Thank you for any help. Robert

回答 (1 件)

Walter Roberson
Walter Roberson 2013 年 8 月 20 日

0 投票

datacell = cell(NumberOfTasks, NumberOfTasks);
set(UITableHandle, 'Data', datacell);
When the data is ready to be fetched, have the callback from the ENTER ARRAY button use
datacell = get(UITableHandle, 'Data');
That will put datacell into the workspace of the callback. To put it into some other workspace is trickier. See http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.3F

カテゴリ

ヘルプ センター および File ExchangeCell Arrays についてさらに検索

質問済み:

2013 年 8 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by