writetable error line183, the first argument must be a table
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
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)
Wei Du
on 25 Feb 2022
Accepted Answer
More Answers (0)
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!