writetable error line183, the first argument must be a table
1 view (last 30 days)
Show older comments
I use the original code getting from Matlab website, which is as follows.
And the error was ''Error using writetable, First argument must be a table (line183)".
My matlab version is R2020b
Cause the code is from the authority, it supposely does work. However, it does not work
T = table(['M';'F';'M'],[45 45;41 32;40 34],...
{'NY';'CA';'MA'},[true;false;false])
writetable(T)
THIS IS THE SNAPSHOT

2 Comments
Steven Lord
on 24 Feb 2022
That error message doesn't look like a MathWorks written error message, and when I tried an experiment using release R2020b that's not the message I received. Can you confirm that you copied it verbatim from the Command Window into your Answers post? If you didn't copy it verbatim, could you please do so in a comment? Was this the error you received?
cd(tempdir)
writetable(42)
Accepted Answer
Walter Roberson
on 24 Feb 2022
Use
which -all table
to find out which function named table you are invoking. You should be seeing that tabuluar/@table/table.m as the first entry on the list, but it sounds as if you have some other function named table.m that is interfering.
12 Comments
Walter Roberson
on 4 Mar 2022
Did you delete D:\iProgramFiles\toolbox\spm12\external\fieldtrip\compat\matlablt2013b folder ?
More Answers (0)
See Also
Categories
Find more on Instrument Control Toolbox Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!