フィルターのクリア

Cell contents assignment to a non-cell array object.

2 ビュー (過去 30 日間)
Jonasz
Jonasz 2013 年 8 月 18 日
回答済み: Frank Ozioko 2018 年 6 月 25 日
I want to put many arguments into listbox in Matlab Guide.
Code :
for i=1:length(setX)
handles.myList{i}={num2str(setX(i))};
end
guidata(hObject, handles);
Where:
setX is a mat variable containing numbers.
What is wrong and how to fix it?

採用された回答

Walter Roberson
Walter Roberson 2013 年 8 月 18 日
If handles.myList is the handle of a uicontrol('style','list') then the handle cannot be indexed.
Try (just)
set(handles.myList, 'String', cellstr(num2str(setX(:))))
  1 件のコメント
Jonasz
Jonasz 2013 年 8 月 18 日
Thank You very much .

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

その他の回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 18 日
編集済み: Azzi Abdelmalek 2013 年 8 月 18 日
Maybe your cell array handles.myList was used as double before these lines of code
  1 件のコメント
Jonasz
Jonasz 2013 年 8 月 18 日
It's the first time I put something into this handles.

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


Frank Ozioko
Frank Ozioko 2018 年 6 月 25 日
I am new to MATLAB programming, who can help me identify and correct this error message: 'Cell contents assignment to a non-cell array object'
>> n=10; xmax=100; x=randi(xmax,n) for i=1:9; for j=2:10; x{i}=x([i,j;j,j]) end end

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by