Put structure data into GUIDE table

2 ビュー (過去 30 日間)
Douglas Anderson
Douglas Anderson 2021 年 9 月 28 日
コメント済み: Douglas Anderson 2021 年 10 月 1 日
Hello!
I would like to load data from a structure 'struc' into a GUIDE table 'file_table'. The structure has the following fields:
file_name: {8×1 cell}
serial_number: {8×1 cell}
event_date_time: {8×1 cell}
ppv: {8×1 cell}
shot_assignment: {8×2 cell}
instlocs: [8×2 double]
instadd: [8×1 string]
I just use
set(handles.file_table,'Data',struc);
I have tried a whole bunch of changes to the structure (the structure is from someone else's coding), with no success. What am I doing wrong? I can trim the instlocs and shot_assignment fields to be 8x1.
Thanks!.

採用された回答

Geoff Hayes
Geoff Hayes 2021 年 9 月 29 日
Douglas - perhaps you need to convert the struct to a table before setting the uitable. Try using struct2table to see if that helps.
  3 件のコメント
Douglas Anderson
Douglas Anderson 2021 年 10 月 1 日
Thank you very much, Geoff!
That works. Amazing how roundabout one sometimes has to go.
Doug

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

その他の回答 (0 件)

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by