Effacer les filtres
Effacer les filtres

Matlab output to excel for loop

1 vue (au cours des 30 derniers jours)
jchris14
jchris14 le 29 Sep 2014
Commenté : dpb le 29 Sep 2014
Hi,
I have a code that analyzes several individual images through a for loop. the output for each selected image is called answer. The code is written in such a way that in the command window, MATLAB outputs, the name of the selected image and the answer. What code can i use to export the name of the selected image and the answer in A and B column respectively?
I have tried using xlswrite('filename',answer) just to show all the answers in 1 column and it seems like it is not getting looped and stores just the last answer as an excel file.
thanks for the help
  1 commentaire
dpb
dpb le 29 Sep 2014
Per the doc for xlswrite, each invocation writes only the data to the file in the call; hence by doing what you've done you've rewritten the same file over and over leaving only the last invocation.
Look at
doc fprintf % and friends
A truly specific answer would need to see the pertinent section of your code...

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by