필터 지우기
필터 지우기

Error using table/writ​etable/wri​tecell

조회 수: 12 (최근 30일)
R
R 2022년 2월 4일
답변: Simar 2024년 1월 4일
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
Walter Roberson
Walter Roberson 2022년 2월 5일
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?

댓글을 달려면 로그인하십시오.

답변 (1개)

Simar
Simar 2024년 1월 4일
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

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by