[export a table] Err using writetable, first argument must be a table, but it is a table?!
3 次查看(过去 30 天)
显示 更早的评论
Hi all,
I met a problem when I wanted to use the fonction "writetable" to export the data, into a csvfile, xlsx, or whatever. ## Matlab Env: R2022a
To simplify my problem, I just use the example in matlab to create a table, but it doesn't work when I want to export the table.
I have confirmed that it does not exist other scripts or anything else called "patients".
Then I want to find the core of "patients", I am really confused whether it is a table or not?
If it is, why there exists an error using writetable;
if not, why and what should I do?
And the most important thing, how to export the tabledata???
Thank you in advance!
0 个评论
回答(1 个)
Angelo Yeo
2023-9-26
That is not reproducible in my R2022a. When "writetable" only has a first argument, it creates a text file with the same name as the input table.
Would you mind following the guidance below to restore your MATLAB settings to default?
-----------------------------------------------------
It seems that the problem you are experiencing is an abnormal operation of the product. Please apply the following instructions to initialize path and preference settings for the normal operation of MATLAB. If the following methods do not solve the problem, the only solution to the abnormal operation of the product is re-installation.
Right-click on the MATLAB execution icon to run MATLAB in administrator mode, and then execute the following commands in the MATLAB command window.
>> restoredefaultpath
>> rehash toolboxreset
>> rehash toolboxcache
>> sl_refresh_customizations % Please run this line only when you use Simulink related products.
>> savepath
>> prefdir
If there is no problem executing each command (a warning message is ok),
Open the directory along the path that appears when the last command is executed. Then close MATLAB.
Go up to the parent folder of the open directory, rename R20XXx to R20XXx_old (Ex. R2020a -> R2020a_old). Then launch MATLAB.
-----------------------------------------------------
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!