フィルターのクリア

How to assign a cell to a double variable in a table of gui matlab?

1 回表示 (過去 30 日間)
Jorge  Alvarado
Jorge Alvarado 2016 年 12 月 12 日
回答済み: Matthew Murphy 2016 年 12 月 16 日
for example a=get(handles.uitable1,'Data'); data2 = cell2mat(a) c1=(data2(1,1)) c2=(data2(1,1)) c3=c1*c2 but the operation is not correct, or i can do a operation with two cells from a table in gui matlab

回答 (1 件)

Matthew Murphy
Matthew Murphy 2016 年 12 月 16 日
Firstly, format any code that you present in the question with the {}Code button.
All you need to do is access the data you retrieve with braces in order to convert the cell array.
EX:
a = get(handles.uitable1,'Data'); %a is a cell with a 2x2 array inside
array = a{:}; %array is a 2x2 array

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by