フィルターのクリア

Error: Conversion to double from cell is not possible.

5 ビュー (過去 30 日間)
CK
CK 2019 年 7 月 10 日
コメント済み: CK 2019 年 7 月 11 日
Hi,
I'm using the App Desiner to write an optimization model.
I'm facing this problem can someone help? I also created a matrix with zeros (matrix=zeros(4,4)) and stored it in 'zero.mat', which is of a class:double.
function import(app,event)
if event.Indices(2)==3 && event.NewData>0
data=app.UITable.Data;
neu=event.NewData;
data(event.Indices(1),1)={neu};
app.UITable.Data=data;
end
end
  2 件のコメント
dpb
dpb 2019 年 7 月 10 日
import is a Matlab-supplied data input function; your function will alias that. You might consider changing names to something that doesn't conflict.
As to the error, you wrote
data(event.Indices(1),1)={neu};
that specifically turned event.NewData into a cell, whatever the new data were; then you tried to write that in the next line to a UITable. Remove the {} as first guess...
CK
CK 2019 年 7 月 11 日
it worked! Thank you so much!!

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by