フィルターのクリア

Input data with editable uitable in app designer?

1 回表示 (過去 30 日間)
Beatriz Ruiz
Beatriz Ruiz 2018 年 6 月 17 日
回答済み: Beatriz Ruiz 2018 年 6 月 17 日
I want the user to write numbers and then turn this numbers(doubles) into an array of doubles. I tried with an uitable and the following code, but I have problems with the function cell2mat when I introduce different numbers (e.g. 2, 10 and 0.01)
data=app.UITableEnventanado.Data(:,1)
data1=cell2mat(data)
data2=str2double(data1)
the error is this:
Error using cat
Dimensions of arrays being concatenated are not consistent.
Error in cell2mat (line 83)
m{n} = cat(1,c{:,n});
Thanks

採用された回答

Beatriz Ruiz
Beatriz Ruiz 2018 年 6 月 17 日
I found the solution. Cell2mat is unnecessary. It works this way:
data=app.UITableEnventanado.Data(:,1);
data2=str2double(data1);

その他の回答 (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