Azzera filtri
Azzera filtri

Using a directory to go into an excel file, how calculate an average for a specific column, then calculate the average of all those columns?

1 visualizzazione (ultimi 30 giorni)
So I've been able to create a struct of the 203 files in the directory, but I'm having a lot of trouble from there using that directory to go in, one by one, and calculate averages for specific columns of data, and then from there, sum those averages to create an average of those.
One trick here that I've been running into is not all the files have the same column length, so I've been using end-1 to calculate an average for any length of column, but to no success.
Below I've included some screenshots of the code and file structure in the struct I'm looking at, if that helps.
Thanks!

Risposte (1)

Vishwanath Bailore Acharya
I have attached a sample code which achieves the same functionality that you are trying to achieve. Look into it and let me know if it helps you to achieve your functionality.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by