Too many output arguments error

2 vues (au cours des 30 derniers jours)
Samuel Vadovic
Samuel Vadovic le 2 Nov 2023
Commenté : Voss le 2 Nov 2023
A = magic(5);
B = writematrix(A, 'M.xls');
command window:
Error using writematrix
Too many output arguments.
Error in faf (line 2)
B = writematrix(A, 'M.xls');
  1 commentaire
Samuel Vadovic
Samuel Vadovic le 2 Nov 2023
I really dont get why this started to happen suddenly...

Connectez-vous pour commenter.

Réponse acceptée

Voss
Voss le 2 Nov 2023
writematrix doesn't return any outputs.
Just say:
writematrix(A, 'M.xls')
What do you intend to be stored in B?
  2 commentaires
Samuel Vadovic
Samuel Vadovic le 2 Nov 2023
thanks, that solved it
Voss
Voss le 2 Nov 2023
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by