Effacer les filtres
Effacer les filtres

Error using table/writ​etable/wri​tecell

12 vues (au cours des 30 derniers jours)
R
R le 4 Fév 2022
When i try to create a table or write it/a cell to a file I get the following error
Error using writecell (line 165)
Invalid default value for property 'metaDim' in class 'table':
Too many output arguments.
I also get this error when copy/pasting the examples from the matlab website so it isnt a problem with my code.
  1 commentaire
Walter Roberson
Walter Roberson le 5 Fév 2022
I suggest experimenting with
restoredefaultpath; rehash toolboxcache
if that fixes the problem, then you have some .m file on your path that is interfering with internal MATLAB use of one of its functions.
Which MATLAB release are you using?

Connectez-vous pour commenter.

Réponses (1)

Simar
Simar le 4 Jan 2024
Hi,
I understand that you are facing error while attempting to perform operations involving tables or cells in MATLAB.
The error message suggests that there might be an issue with MATLAB's internal functions or a conflict with custom scripts or functions in the MATLAB path. The error too many output arguments implies that a function is returning more outputs than expected, which could be due to an overload of a built-in function by a custom one with the same name, or a corrupted installation.
Here are some workarounds to diagnose and resolve the issue:
1. Check for Overloaded Functions:
Use the which command to check if there is an overloaded writecell or any other related function in the MATLAB path. For example:
which writecell -all
If the which command shows a file that is not within the MATLAB root directory, a custom function might be overshadowing the built-in one. Rename or remove the custom function to avoid conflicts.
2.Check for Name Conflicts:
Ensure to not have any variables with the same name as built-in functions. For example, if have a variable named writecell, it could cause conflicts.
3.Restore Default Path:
It is possible that the MATLAB path has been altered, leading to issues with function calls. Restore the default path by using the command:
restoredefaultpath;
rehash toolboxcache;
After restoring the default path, try running the code again.
4.Clear Workspace and Command Window:
Clear the workspace and Command Window to remove any residual variables or functions that may be causing issues:
clear all;
clc;
Try running the code again after clearing the workspace.
If issue persists, consider reaching out to MathWorks technical support for assistance. Remember to always back up before making significant changes to MATLAB installation or performing operations that might affect the code and data.
Please refer to the following documentation links:
Hope it helps!
Best Regards,
Simar

Catégories

En savoir plus sur Data Type Identification dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by