Values within a cell array must be numeric, logical, or char
2 次查看(过去 30 天)
显示 更早的评论
hi, how can i solve it?
i've allegate "pl"
pl=struct2table(app.Preset);
vv=pl{:,1};
[~,vv,~]=fileparts(vv);
pl(:,1)={vv};
app.Preset_UITable.Data=table2cell(pl);
Error setting property 'Data' of class 'Table':
Values within a cell array must be numeric, logical, or char
回答(1 个)
Sulaymon Eshkabilov
2024-1-5
Which line is causing the issue?
In this example, all steps of converting struct - 2 - table and table - 2 - cell are working ok.
STR.V1 = "/home/jsmith/myfile.txt";
STR.V2 = 'C';
STR.V3 = 123;
STR.V4 = pi;
TAB = struct2table(STR)
W=TAB{:,1};
[~,W,~] = fileparts(W);
TAB(1,1) = {W};
CELL_A = table2cell(TAB)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Type Identification 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!