Cell contents assignment to a non-cell array object.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jonasz
el 18 de Ag. de 2013
Respondida: Frank Ozioko
el 25 de Jun. de 2018
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?
0 comentarios
Respuesta aceptada
Walter Roberson
el 18 de Ag. de 2013
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(:))))
Más respuestas (2)
Azzi Abdelmalek
el 18 de Ag. de 2013
Editada: Azzi Abdelmalek
el 18 de Ag. de 2013
Maybe your cell array handles.myList was used as double before these lines of code
Frank Ozioko
el 25 de Jun. de 2018
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
0 comentarios
Ver también
Categorías
Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!