Effacer les filtres
Effacer les filtres

Error using table (line 254) , 2021a vs 2018a

1 vue (au cours des 30 derniers jours)
Marvin Gerhardt
Marvin Gerhardt le 3 Juin 2022
hey guys,
i do have a problem that seems to occur based on the matlab version i use:
In 2021a this row creates a table as i want:
table('Size',[12 13],'VariableNames',{'400','600','800','1000','1200','1400','1600','1800','2000','2200','2500','3000','3500'}, 'RowNames',{'-400','-300','-200','-100','0','50','100','200','300','410','420','490'},'VariableTypes',["string","string","string","string","string","string","string","string","string","string","string","string","string"]);
In 2018a the same line creates the following error:
Error using table (line 254). Specify variable types as a cell array of character vectors, indicating the type of each variable created.
Does anyone know why it works in 2021a but not in 2018a? Ive found nothing..
Any help is highly appreciated, thanks in advance!!
Best, Marvin
  1 commentaire
Stephen23
Stephen23 le 3 Juin 2022
"Does anyone know why it works in 2021a but not in 2018a?"
Judging by the error message, R2018a does not support string arrays for that parameter.
You can use a cell array of character vectors with both versions.

Connectez-vous pour commenter.

Réponses (1)

Marvin Gerhardt
Marvin Gerhardt le 3 Juin 2022
Hi Stephen,
thanks! I tried this but im running into new errors..
can you give an example how to do this?
thanks !!

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by