Show cell elements in an Item in app designer
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Celia Sanchez-Giron
el 8 de Jun. de 2022
Comentada: Celia Sanchez-Giron
el 9 de Jun. de 2022
Hi,
I am working with an object rob1 which is an humanoid robot.
rob1= Hum(Estacion1, eje, baseRobot_, q0_);
% The name of the joint (neck, arm, leg...) is stored in the cell "eje" this way.
%1: Cadera d gira
eje.CadDG=1;
%2: Cadera lateral d
eje.CadDL= 2;
% 3: Cadera frontal d (q pie se queda en suelo)
eje.CadDF= 3;
% 4: Rodilla d
eje.RodD= 4;
% 5: Tobillo frontal i
eje.TobD= 5;
% 6: Tobillo lateral i
eje.TobDL= 6;
% 7: Cadera i gira
eje.CadIG=7;
% 8: Cadera lateral i
eje.CadIL= 8;
% 9: Cadera frontal i (q pie se queda en suelo)
eje.CadIF= -9;
% 10: Rodilla i
eje.RodI= 10;
% 11: Tobillo frontal i
eje.TobI= 11;
% 12: Tobillo lateral i
eje.TobIL= 12;
% 13: Tronco lateral
eje.TronL=13;
% 14: Hombro d frontal
eje.HomDF= 14;
so if I write "fields(rob1.eje)" in the command window I will receive a cell with these elements.
I want to show this cell elements in appdesigner ItemBox, so instead pasing each name I want to pass the whole cell so it appears at the list box.
To call my "rob1" I use an general object "H" in appdesigner because I have different robots (rob1, rob2, rob3...).
properties (Access = private)
H;
end
My problem is that I would like to show the cell elements (eje) in the Itembox. How can I do that? if I write app.H.eje on the ItemBox I have no answer.
Thank you in advance!!!
2 comentarios
Monica Roberts
el 8 de Jun. de 2022
Do you mean a list box? If you use a list box you can do:
mycell = fields(rob1.eje);
app.ListBox.Items = mycell;
Respuestas (0)
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!