Effacer les filtres
Effacer les filtres

writematrix, writetable, writecell not working?

63 vues (au cours des 30 derniers jours)
Chaitanya Jha
Chaitanya Jha le 21 Nov 2019
Modifié(e) : Adam Danz le 24 Nov 2019
Hi, I am trying to save data in .csv, .txt and .xls format. Matlab recommends to use writematrix, writetable or writecell instead of xlswrite. But when I try it these functions are not working, this is the error message that I got when I tried the exact example shown on Matlab page https://uk.mathworks.com/help/matlab/ref/writematrix.html.
"Undefined function or variable 'writematrix'."
the example that I tried is:
M = magic(5);
writematrix(M,'M_tab.txt','Delimiter','tab');

Réponses (1)

Adam Danz
Adam Danz le 21 Nov 2019
Modifié(e) : Adam Danz le 24 Nov 2019
writematrix() was released in r2019a. You are using r2018b which is why that function is not defined.
Here are links to the documentation for specific release. Use the r2018b documentation for your current version of matlab.

Produits


Version

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by