unmatched the number of variables specified
Mostrar comentarios más antiguos
Hello,
I have different test data, then I try to get plots. However, some of test data gives their plot, some of them doesn't work. For example, cycle test data to obtain the plot works whereas HPPC test doesn't work.
I have the error written below.
Error using tabular/renamevars
The number of new variable names must match the number of variables specified.
Empties = renamevars(Empties, Empties.Properties.VariableNames, ["Storage_Temperature", "Storage_Time_Months", "Notes", "Validate"]); ...
2 comentarios
Mathieu NOE
el 7 de Mzo. de 2024
please share a working code + some files if you can
Tugce
el 21 de Mayo de 2024
Respuestas (2)
Florian Bidaud
el 7 de Mzo. de 2024
Editada: Florian Bidaud
el 7 de Mzo. de 2024
0 votos
The error is self explanatory, Empties.Properties.VariableNames returns a cell array of all the variable names. You try to replace them by ["Storage_Temperature", "Storage_Time_Months", "Notes", "Validate"]. so 4 variables. It means the table 'Empties' does not have 4 variables.
I suspect in your case one of the variables was empty and then got removed from the table.
Tugce
el 14 de Mzo. de 2024
0 votos
Categorías
Más información sobre Tables en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!