Show cell elements in an Item in app designer
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Monica Roberts
2022 年 6 月 8 日
Do you mean a list box? If you use a list box you can do:
mycell = fields(rob1.eje);
app.ListBox.Items = mycell;
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Develop Apps Using App Designer についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!