[export a table] Err using writetable, first argument must be a table, but it is a table?!
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Angelo Yeo
am 26 Sep. 2023
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 Kommentare
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!