why do I get these errors ?
显示 更早的评论
Hi, when I want to convart my empty array to a table:
TT = cell2table(cell(0,11));
TT.Properties.VariableNames = {'DepVar','GC','Reg','Type','n',' b','Pvalue','GCQ_T','ngrid','min_grid','max_grid'};
I get this error:
Error using matlab.internal.datatypes.parseArgs
No method 'parseArgs' with matching signature found.
Error in cell2table (line 31)
= matlab.internal.datatypes.parseArgs(pnames, dflts, varargin{:});
while i have done this befor and never got this error. I would appreciate it if you could help me solve this error or help me with any other solution to convert my empty 11 column array to a table with a specified name for each column.
8 个评论
KALYAN ACHARJYA
2021-1-6
Why your question is NOT "urgent" or an "emergency"!
https://in.mathworks.com/matlabcentral/answers/29922-why-your-question-is-not-urgent-or-an-emergency
Walter Roberson
2021-1-6
What shows up for
which -all matlab.internal.datatypes.parseArgs
You should see something like
>> which -all matlab.internal.datatypes.parseArgs
/Applications/MATLAB_R2020b.app/toolbox/matlab/datatypes/shared/matlab_datatypes/+matlab/+internal/+datatypes/parseArgs.m % static method or package function
john wu
2021-1-6
Walter Roberson
2021-1-6
Which MATLAB release are you using?
john wu
2021-1-6
Walter Roberson
2021-1-6
I just checked in R2018a, and the function does exist. You might have a corrupt MATLAB, and probably need to reinstall.
john wu
2021-1-6
Walter Roberson
2021-1-6
Yes, you could restore from the system backups you have been keeping.
回答(1 个)
I would set the VariableNames as you're converting the cell array, not after the fact. I made it a 1-by-11 table so you could see the variable names.
TT = cell2table(cell(1,11), 'VariableNames', ...
{'DepVar','GC','Reg','Type','n',' b','Pvalue','GCQ_T','ngrid','min_grid','max_grid'})
8 个评论
Walter Roberson
2021-1-6
It recognized cell2table() with no problem. cell2table() is calling upon the internal function matlab.internal.datatypes.parseArgs which does exist in R2018a, and the line number (31) of the error message does match the line number at which the function is called in R2018a -- so your cell2table.m is probably fine. But you are missing that internal routine.
john wu
2021-1-6
Walter Roberson
2021-1-6
Did you configure File History? https://support.microsoft.com/en-us/windows/backup-and-restore-in-windows-10-352091d2-bb9d-3ea3-ed18-52ef2b88cbef
If you are using Mac, do you have Time Machine enabled?
john wu
2021-1-6
Rik
2021-1-6
Then you are currently learning an important lesson: make sure you have a backup of anything you don't want to lose.
Walter Roberson
2021-1-6
You just might be able to take advantage of https://support.microsoft.com/en-us/windows/recover-lost-files-on-windows-10-61f5b28a-f5b8-3cc2-0f8e-a63cb4e1d4c4
john wu
2021-1-6
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!