필터 지우기
필터 지우기

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?

조회 수: 2 (최근 30일)
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!

답변 (1개)

Vishwanath Bailore Acharya
Vishwanath Bailore Acharya 2018년 4월 16일
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.

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by