Error when creating an empty Table
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Reza Zomorodi
il 7 Mar 2022
Commentato: Star Strider
il 7 Mar 2022
I faced the following error when i use "table" command to create and empty table:
my_results = table
Error using ones
Invalid default value for property 'metaDim' in class 'table':
Size inputs must be scalar.
Error in all (line 68)
sz = [sz,ones(1,DIM-length(sz))];
Error in matlab.internal.tabular.private.metaDim (line 45)
if ~(isCharStrings(labels,true) && all(strlength(labels) > 0, 'all')) % require cellstr, whitespace, but not empty allowed
any suggestion?
0 Commenti
Risposta accettata
Star Strider
il 7 Mar 2022
To preallocate a table see the documentation section on Specify Size and Variable Types since an empty table nevertheless has specific requirements for its construction.
4 Commenti
Più risposte (1)
Peter Perkins
il 7 Mar 2022
Reza, if that's really what you get in the command window, and you have not left anythng out, then you either have something else named "table", or you have something seriously wrong with your MATLAB install.
Vedere anche
Categorie
Scopri di più su Startup and Shutdown in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!